Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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,387 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,387 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,387 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,387 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