Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Proper way to include multiple criteria in WHERE statement

Status
Not open for further replies.

Maven4Champ

Technical User
Jun 16, 2004
154
Greetings,

I am working backwards on an MS Access database that was developed by someone who left our company. I am trying to modify an append query wher the column BranchCode is equal to 0, 10, 20, 40 and 50. However I also have another field with WHERE criteria in my Query Design view.

I want to be sure to keep that condition intact as well as add the additional branch code query to expand my results.

My question is:
Do I put the following in my criteria field:
Field: BranchCode
Total: Where
Criteria: "0" And "10" And "20" And "40" And "50"

~OR~

Do I simply add 0 in the first criteria field, 10 in the next criteria field going vertical (in the or field) and continue down the line with all of my data?

Which one does what and are there any different effects of doing it one way versus the other?

Thanks!
 
You can use
Total: Where
Criteria: IN("0","10","20","40","50")
Remove the double quotes if the field is numeric....


Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top