Query with 2 field selection criteria

J

Joe M.

I have a query with selection criteria in 2 fields. The query receives the
selection from text boxes on a form. I want to be able to return results from
the query without having to fill both text boxes. If I leave either one blank
the query returns no results. How do I do this?

Thanks,
Joe M.
 
S

Steve Schapel

Joe,

In the criteria, enter like this:
[Forms]![NameOfForm]![NameOfTextbox] Or [Forms]![NameOfForm]![NameOfTextbox]
Is Null

After you have saved the query, the next time you open in design view you
will probably see that Access has re-arranged the layout to suit its own
purposes... don''t worry about this.
 

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