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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two field criteria in Where statement?

Status
Not open for further replies.

BenTitus

Programmer
Jan 16, 2003
61
0
0
US
Hello,
I am working on a query the contains an order number, part# and Bore dimension. Recently people have been entering too large of bore dimensions which cause a part to be made incorrectly. There are 30 different part numbers that i am checking to see if the bore dimensions are correct for and there are about 50 orders entered each day. I am not exactly sure how to check this... I created a basic query that was:
SELECT [Error Check].[Order*Line Item], [Error Check].[Part#], [Error Check].BoreNum
FROM [Error Check]
WHERE(([Error Check].[Part#] = 073560-000) and ([Error Check].BoreNum >2.93))

I was planning on writing OR for each part number in the where clause but i am getting an error when i attempt it with just one number. If anyone had any suggestions i would appreciate it.
 
sorry i figured it out

SELECT [Error Check].[Order*Line Item], [Error Check].[Part#], [Error Check].BoreNum
FROM [Error Check]
WHERE ((([Error Check].[Part#])="073560-000") AND (([Error Check].BoreNum)>"2.93")) OR ((([Error Check].[Part#])="073550-000") AND (([Error Check].BoreNum)>"2.37"));

it now works... i just missed one bracket
 
Even though you got this sorted out, I would suggest that you consider implementing a standard naming convention. Field/table names with punctuation and/or spaces should be avoided. You might want to review some of Tony Toews' recommendations at
Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top