I want to be able to put a button on my form that prints a report just for the record i am currently viewing. Is that possible? I set a button up through the wizard and it just brings up the report with all of the records.
Try this in your command button on click event using your report name and your id fields.
Dim stDocName As String
Dim strCriteria As String
stDocName = "myreport"
strCriteria = "myid = " & [myID]
DoCmd.OpenReport stDocName, acPreview, , strCriteria
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.