Conditional Criteria

  • Thread starter Thread starter Michael D. McGill
  • Start date Start date
M

Michael D. McGill

Can I make the criteria in a query be conditional? For example:

Table Customer:
Insurance Code
Birth Date
Etc...

I am doing a query on the above customer table I want my query to show me
only customers who were born after 1/1/2000 if their Insurance Code =1, and
all other customers.

I tried using the iif statement in the citeria field of the customer but
can't get it to work.

Thanks in advance,
Mike
 
You might try something like this in query design view:

1. Set the value in the "Criteria" row for the Insurance Code field to 1.

2. Set the value in the "Criteria" row for the Birth Date field to
#1/1/2000#.

3. Set the value in the "or" row (below the "Criteria" row) for the
Insurance Code Field to:

Is Null Or <>1.
 

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