Report Opening/Printing

  • Thread starter Andy Man via AccessMonster.com
  • Start date
A

Andy Man via AccessMonster.com

I have nearly fully completed a database which is mostly VBA although is full of forms. The user opens the form and scans through the records. I want the user to be able to print off the exact record that he is on. In order to do that, i need the report to open on the record number. I can have a recursive loop to obtain the record number but i need the report to open on the record. Do you know if it is possible to do this without code?
 
R

Rick B

Not sure why you want to do it without code. If you want to do it using
code, it would be...


Button to print specific record
Private Sub Print_Button_Click()

If (IsNull([UserID])) Then

' Verify the key field (UserID) has a selection

Exit Sub

End If

DoCmd.OpenReport "SomeReportName", acViewNormal, "","[UserID] =
Forms![frmSomeFormName]![UserID]"

End Sub







Andy Man via AccessMonster.com said:
I have nearly fully completed a database which is mostly VBA although is
full of forms. The user opens the form and scans through the records. I want
the user to be able to print off the exact record that he is on. In order to
do that, i need the report to open on the record number. I can have a
recursive loop to obtain the record number but i need the report to open on
the record. Do you know if it is possible to do this without code?
 
A

Andy Man via AccessMonster.com

Thanks a lot mate, will give it a go! Damn, you were fast in answering. Cheers again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top