S
Scott B
Greetings,
I have a form that derives it's data from a query with criteria [Type
Arrival Date]. I have a report that is opened with a command button from
the form with the following code on the On Click event:
Private Sub cmdPrintArrivals_Click()
On Error GoTo Err_cmdPrintArrivals_Click
Dim stDocName As String
stDoc = "rptGuestArrivals"
stCriteria = "ID = " & Me.ID
DoCmd.OpenReport stDoc, acNormal, , stCriteria
Exit_cmdPrintArrivals_Click:
Exit Sub
Err_cmdPrintArrivals_Click:
MsgBox Err.Description
Resume Exit_cmdPrintArrivals_Click
End Sub
Can anyone tell me how I make it so the report takes the criteria from the
form without the criteria pop-up appearing when the report is opened from
the command button? The form and the report both use the same query.
Thanks,
Scott B
I have a form that derives it's data from a query with criteria [Type
Arrival Date]. I have a report that is opened with a command button from
the form with the following code on the On Click event:
Private Sub cmdPrintArrivals_Click()
On Error GoTo Err_cmdPrintArrivals_Click
Dim stDocName As String
stDoc = "rptGuestArrivals"
stCriteria = "ID = " & Me.ID
DoCmd.OpenReport stDoc, acNormal, , stCriteria
Exit_cmdPrintArrivals_Click:
Exit Sub
Err_cmdPrintArrivals_Click:
MsgBox Err.Description
Resume Exit_cmdPrintArrivals_Click
End Sub
Can anyone tell me how I make it so the report takes the criteria from the
form without the criteria pop-up appearing when the report is opened from
the command button? The form and the report both use the same query.
Thanks,
Scott B