Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

access 2002 report printout


  • Please log in to reply

#1
laratomb13

laratomb13

    New Member

  • Member
  • Pip
  • 7 posts
I have a simple access database, with a command button for printing out a report. The problem is when I hit the button the whole report is printed when I only want the form I'm looking at to printout. The problem seem's to be with the VB language in the button build but i cant make head nor tail of it. Any help at all will be deeply appreciated.

Thanks too all who reply

Edited by laratomb13, 15 June 2005 - 10:02 AM.

  • 0

Advertisements


#2
peterm

peterm

    Trusted Tech

  • Technician
  • 3,173 posts
can you post the button script here so we can look at it
  • 0

#3
laratomb13

laratomb13

    New Member

  • Topic Starter
  • Member
  • Pip
  • 7 posts
Hear you go peterm.

Private Sub Command80_Click()
On Error GoTo Err_Command80_Click

Dim stDocName As String

stDocName = "PC Database"
DoCmd.OpenReport stDocName, acNormal

Exit_Command80_Click:
Exit Sub

Err_Command80_Click:
MsgBox Err.Description
Resume Exit_Command80_Click

End Sub



Thanks for replying any help will be deeply appreciated

Laratomb
  • 0

#4
peterm

peterm

    Trusted Tech

  • Technician
  • 3,173 posts
ok your command says to open report.not print form.
To make sure you don't wreck anything just go to design mode
add a new button and use the wizard to set print form.
Do you know how to do this?
OR
Access

Edited by peterm, 17 June 2005 - 11:47 AM.

  • 0

#5
laratomb13

laratomb13

    New Member

  • Topic Starter
  • Member
  • Pip
  • 7 posts
hi peterm,
I have already tried what you suggested and it prints out the record i am looking at but in form view (what is on the screen). What I wish to do is print out what i am looking at but in the report view that i have set up. I know that the VB says OpenReport, for the button and it does print out but it will only print out all of the records in the report view i set up. I hope I'm not getting confusing, thanks again for trying. If you come up with anything else I will be willing to try it out.



Thanks

Laratomb
  • 0

#6
peterm

peterm

    Trusted Tech

  • Technician
  • 3,173 posts
Did you try mk link they are very good
  • 0

#7
laratomb13

laratomb13

    New Member

  • Topic Starter
  • Member
  • Pip
  • 7 posts
I hav'nt tried that, how do you do that?
  • 0

#8
peterm

peterm

    Trusted Tech

  • Technician
  • 3,173 posts
In my second reply where it says Access and is underlined
  • 0

#9
laratomb13

laratomb13

    New Member

  • Topic Starter
  • Member
  • Pip
  • 7 posts
Thanks a lot peterm i will look at it asap and let you know how i get on

cheers

laratomb
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP