Private Sub ButtonName_Click()
DoCmd.OpenReport "ReportName", acViewPreview, "",
"[ReportField]=[Forms]![FormName]![FormField]", acNormal
End Sub
This would open a report to a specific "record" - this could be a reciept or
a letter, etc.
Like anything else making code work in the way you want takes a while. Can
I suggest you look at using a Macro (somepeople don't like them but they do
have their uses).
Open a new macro and select open report from the drop down list
then simply enter the criteria.
Save the macro and place it behind an OnClick event of a button
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.