Query Criteria

  • Thread starter Thread starter Pass-the-Reality
  • Start date Start date
P

Pass-the-Reality

On my query I added criteria that says [Forms]![frmMain]![Combo11] so that
the query will run based on what is selected from the drop down. However, if
the drop down is left blank (no select made). How would I update my criteria
to say than display all?
 
If you're doing this through the grid, you'd change the criteria to

[Forms]![frmMain]![Combo11] OR ([Forms]![frmMain]![Combo11] IS NULL)

The SQL of the query would change from

WHERE SomeField = [Forms]![frmMain]![Combo11]

to

WHERE ((SomeField = [Forms]![frmMain]![Combo11])
OR ([Forms]![frmMain]![Combo11] IS NULL))
 
Back
Top