Select Query for report

M

margaret

I am using Access 2000. I have a query that has around 12 items. Three of
those items are: account information.minor; account information.major;
account information.account.

I want my criteria on account information.minor to be <"3000"; on account
information.major to be not = "29" or not = "26" or not = "24".

I can get it to do the first two (account information.minor < "3000";
information.major not = "26") however, when I add a third or fourth criteria,
the query fails and returns all information. So the SQL statement reads

WHERE ((([account information].MINOR)<"3000") AND (Not ([account
information].MAJOR)="26"))

How do I write the SQL statement to reflect other criteria?

Thanks for any help.
 
C

Chris

Hi,

Try this this:

WHERE ((([account information].MINOR)<"3000") AND ([account
information].MAJOR) not in ("24", "26", "29")))
 
M

margaret

That worked great. Thanks for your quick respons.

Chris said:
Hi,

Try this this:

WHERE ((([account information].MINOR)<"3000") AND ([account
information].MAJOR) not in ("24", "26", "29")))



margaret said:
I am using Access 2000. I have a query that has around 12 items. Three of
those items are: account information.minor; account information.major;
account information.account.

I want my criteria on account information.minor to be <"3000"; on account
information.major to be not = "29" or not = "26" or not = "24".

I can get it to do the first two (account information.minor < "3000";
information.major not = "26") however, when I add a third or fourth criteria,
the query fails and returns all information. So the SQL statement reads

WHERE ((([account information].MINOR)<"3000") AND (Not ([account
information].MAJOR)="26"))

How do I write the SQL statement to reflect other criteria?

Thanks for any help.
 

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