Lookup Function?

  • Thread starter Thread starter ConstantaFotea
  • Start date Start date
C

ConstantaFotea

On a form I have 2 calculated controls: "Country"
and "Weight".
I want my form to look me up de value for "Tarif" from a
table containing three fields: "Country", "Weight"
and "Tarif" that is suitable for a certain "Weight"
and "Country"
I suppose I should use Lookup Function using 2
criterias "Country" and "Weight" but I do not know how.
Please help me.
I hope you understand me.
Thank you
 
try DLookup("[Tarif]", "tablename", "[Country] = " &
[Country] & " and [Weight] = " & [Weight])
 
On a form I have 2 calculated controls: "Country"
and "Weight".
I want my form to look me up de value for "Tarif" from a
table containing three fields: "Country", "Weight"
and "Tarif" that is suitable for a certain "Weight"
and "Country"
I suppose I should use Lookup Function using 2
criterias "Country" and "Weight" but I do not know how.


DLookup would be an easy way to get the tarif value. When
you want two or more conditions in a where clause, use And
or Or to connect them. You didn't explain much about the
tarifs table, but I think you might want something along the
lines of:
"Country=" & Country & " And Weight=" & Weight
 
Back
Top