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

conditional criteria in query - beginner question

Status
Not open for further replies.

Hosacans

Technical User
Dec 15, 2004
64
US
Hi All,

I'm stuck on a query. I'm trying to select records based on their stock position and also based on location. if the loc_no is less then 10, i only want records with more than 50 units. then if loc_no is >10, it can return all records. i'm using Access 2000, please help.

here's what i got so far:

Code:
SELECT BASE_Main_Refill_with_ST.Style, BASE_Main_Refill_with_ST.EOH_U, BASE_Main_Refill_with_ST.Loc_No
FROM BASE_Main_Refill_with_ST
WHERE (((BASE_Main_Refill_with_ST.EOH_U)=IIf("Loc_No"<10,50)));
thanks
H
 
WHERE BASE_Main_Refill_with_ST.EOH_U>50 ORBASE_Main_Refill_with_ST.Loc_No>=10

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Oops, sorry for the typo:
WHERE BASE_Main_Refill_with_ST.EOH_U>50 OR BASE_Main_Refill_with_ST.Loc_No>=10

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top