Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following example illustrates how to open a report based on the filtered contents of a form. To do this, specify the form's Filter property as the value of the OpenReport method's WhereCondition argument.
Private Sub cmdOpenReport_Click()
If Me.Filter = "" Then
MsgBox "Apply a filter to the form first."
Else
DoCmd.OpenReport "rptCustomers", acViewReport, , Me.Filter
End If
End Sub