Form enabled queries

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
 
A

Allen Browne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top