dlookup two values

jojo86

Registered User.
Local time
Today, 02:15
Joined
Mar 7, 2007
Messages
80
Hi

I am hoping someone can help me with this. I have a form that has two combo boxes (Location and Char). When an option is chosen from the two combo boxes, I need the next field to display a number (Density) that is dependant on the combo box choices. I will explain this more as it may not make sense like this.

Location:
Centre (1)
Urban (2)
Rural (3)

Char:
Within 400m of Town Centre (1)
Between 400 and 600m of Town Centre (2)
More than 600m of Town Centre (3)

The Density depends on what has been chosen:
(1) and (1) = 50 (2) and (1) = 30 (3) and (1) = 20
(1) and (2) = 40 (2) and (2) = 20 (3) and (2) = 15
(1) and (3) = 30 (2) and (3) = 10 (3) and (3) = 10

What I would like the form to do is automatically show the density when the options have been chosen from the two combo boxes. I have a feeling this should be a dlookup, but it will only allow me to specify one value, which is not what I want.

Please help! Thanks
 
I would be holding the desity options in a table . Base a query on this and use the combo boxes as the criteria.
 
Im not sure what I have to do. The locations are in one table, the chars are in another, and the density is in a third table, but with the id's from the location and char tables as combinations...
 
I have actually sorted it now. I was trying to use the And function in the Dlookup but it wasn't working, but I realised that I hadn't put the correct parenthese around it and now it works perfectly!
 

Users who are viewing this thread

Back
Top Bottom