T
Tony Williams
I have a command button on a form that opens a report. Here is my code
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
stDocName = "InvoiceReprint"
DoCmd.OpenReport stDocName, acPreview
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub
How do I add a "Where" statement that will open a report only where the
control "invnbr" on my report equates to a control "repinvnbr" on the form
"reprintinvoices" which has the command button.
many thanks
Tony
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
stDocName = "InvoiceReprint"
DoCmd.OpenReport stDocName, acPreview
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub
How do I add a "Where" statement that will open a report only where the
control "invnbr" on my report equates to a control "repinvnbr" on the form
"reprintinvoices" which has the command button.
many thanks
Tony