need help with Iff argument in Query

wilkob

Registered User.
Local time
Today, 18:05
Joined
Jan 10, 2005
Messages
86
Hello,

I have two tables:

InventoryTable
Product
Length
Weight
Trace number

LocationsTable
Product
LocationA
Min Length LocationA
LocationB

I now would like to combine the two tables in a query where the location which appears depends on the length of the product compared to the minimum length for locationA.

An example:

the product ABZ-56
LocationA: Isle3Bin2
Min Length LocationA: 1500 mm
LocationB: Isle3RestTray

A bar of product ABZ-56 with a length of 3000 mm would suggest location Isle3Bin2
A bar of product ABZ-56 with a length of 1501 mm would also suggest location Isle3Bin2
A bar of product ABZ-56 with a length of 1499 mm would suggest location Isle3RestTray

Can this be done with an Iff argument? If so can someone help me out here, because I have tried various and nothing works :(




Lengths between 0 and 1499 mm
 
Iif([Length]< 1500, [LocationA], [LocationB])
 
works like a charm !!!

thanks

:)
 

Users who are viewing this thread

Back
Top Bottom