Hello All,
I have a form from which I want to print out a report. Right now, when I click the button, all the records print out. i want to print only the record that is currently being viewed. How do I set this 'criteria'? thanks
The code behide the button is as follows:
Private Sub cmdPrintLetter_Click()
Dim stDocName As String
Dim strFilter As String
stDocName = "rptSAHCarerInstallationAppointmentPrint"
strFilter = "[SAHCarerReferenceNumber]"
DoCmd.OpenReport stDocName, acNormal, , strFilter, acDialog
End Sub
I am using Access 2003. thank
TY
I have a form from which I want to print out a report. Right now, when I click the button, all the records print out. i want to print only the record that is currently being viewed. How do I set this 'criteria'? thanks
The code behide the button is as follows:
Private Sub cmdPrintLetter_Click()
Dim stDocName As String
Dim strFilter As String
stDocName = "rptSAHCarerInstallationAppointmentPrint"
strFilter = "[SAHCarerReferenceNumber]"
DoCmd.OpenReport stDocName, acNormal, , strFilter, acDialog
End Sub
I am using Access 2003. thank
TY