Or function in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query that selects employees based on their particular affliliation
with specific companies. However, sometimes I want to be able to select the
employees in the dropdown box with out them being connected to a company. How
would you write the query to either select the company ID or not? I intially
had an or clause in there to populate the dropdown even if the company ID was
null but I kept getting an invalid argument error. What would be a better way?
 
In the criteria row of the query design grid put this --
Like [Enter Company] & "*"

When prompted to 'Enter Company' just press the ENTER key (results in a
null) and it will pull all records.
 

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

Back
Top