Setting up a parametric query to select everything

P

Pawel

Hello,

I have a problem. I have created a parametric query and as
a criteria I have set up a value from combo box.
Everything works fine as long as I am choosing something
in combo box. What I need is to force somehow query to
return every record when nothing is selected in combo box.

Thank you for your help.

Regards,

Pawel
 
T

Tom Ellison

Dear Pawel:

The criteria for one of the filters can be set up like this:

WHERE (YourColumn = [Forms]![FormName]![ControlName]
OR Nz([Forms]![FormName]![ControlName], "") = "")

This will pass all rows when the control is left empty.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 

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