how to print just one record

Toeying

Registered User.
Local time
Today, 19:17
Joined
Jul 30, 2010
Messages
79
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
 
thanks namliam, that was good. cheers
 

Users who are viewing this thread

Back
Top Bottom