Form enabled queries

  • Thread starter Thread starter nir020
  • Start date Start date
N

nir020

I have written a query in access that uses a drop down in a form to allow
that user to alter the parameters of the query.

What I would like to do is within the is drop down is have a selection that
allows the user to view all the data rather just a sub-set of the data based
on the parmeter selected.

Is this possible?

Thanks
 
You will need to craft the WHERE clause of the query so that the condition
evaluates to True when the parameter is null.

In SQL View of your query, you will need something like this:

WHERE ((MyField = [Forms].[Form1].[Text0])
OR ([Forms].[Form1].[Text0] Is Null)

Note that the 2nd option just tests if the parameter is null; it does not
compare it to the field.
 
Back
Top