Condition 1 OR Condition 2

M

Martin

Hi,

Is there any way to increase the number of OR rows
available on a query and thereby increase the number of
single conditions that can be fulfilled for a query? i.e.
Condition 1 OR condition 2 OR condition 3 OR ...condition
n.

Thanks

Martin
 
M

Martin

Scrap that I've figured it out. You think it would be put
somewhere intuitive, not under the insert menu! I guess
I'm just having one of those days :(

Cheers

Martin
 
A

Allen Browne

Switch the query to SQL View. You can now type up to 40 AND/OR phrases in
the WHERE clause.

If several of these are on the same field, the IN operator may help.
Instead of:
Surname = 'Smith' OR Surname = 'Jones' OR Surname = 'Simpson'
you can use:
Surname IN ('Smith', 'Jones', 'Simpson')
and end up with more than 40 names.
 
T

Tom Ellison

Dear Martin:

Often, you may want to have a single value which can be "Value 1" or
"Value 2" or "Value 3" etc.

The IN clause is very usefule here:

WHERE Something IN ("Value 1", "Value 2", "Value 3", . . .)

This may be a partial answer to your needs. This should be used
especially when it make your logic easier to read and maintain.

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