Report Opening/Printing

  • Thread starter Thread starter Andy Man via AccessMonster.com
  • Start date 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?
 
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?
 
Thanks a lot mate, will give it a go! Damn, you were fast in answering. Cheers again!
 
Back
Top