I have a report that pulls information from a query on my main database a report of booking information, however we have to type in the ID number to pull the report.
Query criteria being [Enter ID Number] which comes up when you hit the report button.
I would like the report to automatically pull the ID number when we hit run report.
Can anyone help?
Below is current Event Command, Thanks
Private Sub Command734_Click()
On Error GoTo Err_Command734_Click
Dim stDocName As String
stDocName = "Confirmation Hotel Email WPD"
DoCmd.OpenReport stDocName, acPreview
Exit_Command734_Click:
Exit Sub
Err_Command734_Click:
MsgBox Err.Description
Resume Exit_Command734_Click
End Sub