record from table based on record from other table

F

Fred Dagg

I'm sure this isn't too hard but it's killing me! If a customer has a
pricing level of 1, how do I call pricelevel1 from the products table? This
should also be the case if the customer has a price level of 2, then
pricelevel2 should be called and a price level of 3 should call pricelevel3.
The resulting pricelevel is referred to as UnitPrice.
eg UnitPrice:IIf((Customers.PriceLevel)=1, Products.PriceLevel1,
IIf(Customers.PriceLevel)=2, Products.PriceLevel2,Products.PriceLevel3)).
This is not working in a query.

Thanks in advance
 
O

Ofer Cohen

I think it a metter of brackets, try:

UnitPrice:IIf(Customers.PriceLevel=1, Products.PriceLevel1,
IIf(Customers.PriceLevel=2, Products.PriceLevel2,Products.PriceLevel3))

Compare that string with yours to see where you had the extra bracket
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top