June7
AWF VIP
- Local time
- Today, 00:27
- Joined
- Mar 9, 2014
- Messages
- 5,470
Try using Like with wildcard.
Or set a variable:
BTW, I did more than remove brackets (could have included for same result) from the dynamic parameter. The path referencing is different from what was in the query of posted db, essentially what you say worked before.
Code:
DoCmd.OpenReport cboReports, acViewReport, , "Facility Like '" & Me.cboFacility & "*'"
Code:
Dim strWhere As String
If Not IsNull(cboFacility) Then strWhere = "Facility='" & cboFacility & "'"
...
DoCmd.OpenReport cboReports, acViewReport, , strWhere
BTW, I did more than remove brackets (could have included for same result) from the dynamic parameter. The path referencing is different from what was in the query of posted db, essentially what you say worked before.
Last edited: