Multiple OR statements in query

LeoDee

Registered User.
Local time
Today, 16:27
Joined
Dec 4, 2002
Messages
31
I am using a from for my query criteria. There are 11 possible selections (for printing labels). I built the query and tested it using a single selection. Worked great. However, when I increased the number of "OR" selections to more than 3. It gave me an error, something to the effect too complex.

Does this mean I can not have more than 3 "OR" statements in a query? Or does the problem lay elsewhere? And, is there anyway I can get around this problem. I would like to have all 11 selections available to a single query.

Thanks for your help....
 
I don't know where the problem lies, but YES you can have more than 3 "or" statements in a single query. I did it many times and it works great.
 
Merci!

Now that I know I can have more than 3 "OR" statements in a query, how come I keep getting the following error message when I enter the 4th "OR" statement?

"The expression is typed incorrectly, or it is to complex to be evaluated".

I know it has been typed correctly as I have check it many, many times.

Here is the query SQL: The OR statements are in red.

SELECT Individuals.Titles, Individuals.[First Name], Individuals.[Middle Initial], Individuals.[Last Name], Organizations.OrganizationID, Organizations.[Organization Name], Organizations.Donor, Organizations.Sponsor, Organizations.Vendor, Organizations.Advertiser, Organizations.[Dance Studio], Organizations.[Dance Company], Organizations.[Ed: Secondary], Organizations.[Ed: Elementary], Organizations.[Ed: University], Organizations.Media, Organizations.[Gov't], Organizations.[Non-profit], Organizations.[Address 1], Organizations.[Address 2], Organizations.City, Organizations.State, Organizations.[Zip Code]
FROM Organizations LEFT JOIN Individuals ON Organizations.[Organization Name] = Individuals.[Organization Name]

WHERE (((Organizations.Donor)=[forms]![mailing labels - select Organizations]![Donor])) OR (((Organizations.Sponsor)=[forms]![mailing labels - select Organizations]![Sponsor])) OR (((Organizations.Vendor)=[forms]![mailing labels - select Organizations]![Vendor])) OR (((Organizations.[Dance Studio])=[forms]![mailing labels - select Organizations]![Studio]));

The query works fine until I added the fourth "OR" (In red). Does selecting the criteria from a form create limitations. How can I get around this problem.

Help......
 
Ignore

Please ignore prior post. Multiple ORs are working via form with no problem. I was comparing yes/no boxes and had problems with default condition and error message was confusing me.
 

Users who are viewing this thread

Back
Top Bottom