Select Query for report

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

Guest

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.
 
Hi,

Try this this:

WHERE ((([account information].MINOR)<"3000") AND ([account
information].MAJOR) not in ("24", "26", "29")))
 
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.
 
Back
Top