koolwaters
Active Member
- Joined
- May 16, 2007
- Messages
- 403
I have a report where I need to sometimes specify multiple criteria to limit the results of the report. I created a form with the 2 combo boxes where I can choose the desired criteria.
In essence I may need to filter my results based on the Status and the Level.
So I want the where clause to be Status =ctlStatus and Level =ctlLevel but I am not sure how to enter it.
Thanks for any help!
In essence I may need to filter my results based on the Status and the Level.
So I want the where clause to be Status =ctlStatus and Level =ctlLevel but I am not sure how to enter it.
Code:
Private Sub cmdOpenReport_Click()
On Error GoTo Error_Handler
DoCmd.OpenReport "Opened Items", acViewPreview, , "[Status]='" & Me.ctlStatus & "'"
Error_Handler:
DoCmd.CancelEvent
End Sub
Thanks for any help!