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

Finding a Row in Table with a Range of Numbers 1

Status
Not open for further replies.

kahunaharpervance

Technical User
Feb 2, 2007
1
US
I know how to do this in Excel - Having mucho troubles bending Access to my will.

Table Form:
ID MinLotSize MaxLotSize Samplesize
1 2 8 2
2 9 15 3
3 16 25 5
4 26 50 8

..and so on

An order for parts has a field called "PartsQty".
I need to return "SampleSize" from this table where "PartsQty" is = or > "MinLotSize" AND < "MaxLotSize"

Excel Function VLookup (PartsQty, Range, 2, True) would easily return the proper Value, but I don't know where to start with MSAccess.

I know I'm overlooking something very Basic, but I'm stumped!
 
You could add another column to your query.

myFilter:IIF(PartsQty>= MinLotSize and PartsQty < MaxLotSize,"True","False")

Then on the criteria line, filter for "True"


Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top