Dim qd As DAO.QueryDef
Dim OldSql As String
Set qd = CurrentDb.QueryDefs("YourQueryName")
OldSql = qd.SQL
' To filter for Null:
qd.SQL = OldSql & " Where Field2 Is Null"
' or, to filter for True:
qd.SQL = OldSql & " Where Field2 = True"
' Insert current code to open report
' Reset SQL.
qd.SQL = OldSql
Select allOpen in new window
© 1996-2022 Experts Exchange, LLC. All rights reserved. Covered by US Patent