I am trying to look up values in a table from my query. the lookup has two criteria:
Zoned Rate: Dlookup("rate","ZonedRates","[Zone]=" & [Vendor Zone]AND [Per PcWgt] BETWEEN [Lwgt(lbs)] AND [Wgt(lbs])
The Lookup returns the first value in the lookup table for the field "rate".
I truly would apprecite it if someone can please help me to format this properly so it processes correctly. I have tried adding "" marks around fields and also added table name (i.e. [ZonedRates].[Lwgt(lbs)]) however those don't work. Here are the format of the two tables:
Table 1 (ZonedRates)
---------
Zone
LWgt(lbs) ------ Min Wgt
Wgt(lbs) ------ Max Wgt
Rate
Table 2 (VendorZones) -- this table is in my query
-----------
Vendor Zone
Per PcWgt
From the info Vendor Zone and Per PcWgt i am trying to find the correct rate that falls between the range of Min wgt (Lwgt(lbs) and Max Wgt (Wgt(lbs).
Any help would truly be appreciated. Spent almost a whole day trying to fix this or get online help but still not working.
Thanks in advance.
Zoned Rate: Dlookup("rate","ZonedRates","[Zone]=" & [Vendor Zone]AND [Per PcWgt] BETWEEN [Lwgt(lbs)] AND [Wgt(lbs])
The Lookup returns the first value in the lookup table for the field "rate".
I truly would apprecite it if someone can please help me to format this properly so it processes correctly. I have tried adding "" marks around fields and also added table name (i.e. [ZonedRates].[Lwgt(lbs)]) however those don't work. Here are the format of the two tables:
Table 1 (ZonedRates)
---------
Zone
LWgt(lbs) ------ Min Wgt
Wgt(lbs) ------ Max Wgt
Rate
Table 2 (VendorZones) -- this table is in my query
-----------
Vendor Zone
Per PcWgt
From the info Vendor Zone and Per PcWgt i am trying to find the correct rate that falls between the range of Min wgt (Lwgt(lbs) and Max Wgt (Wgt(lbs).
Any help would truly be appreciated. Spent almost a whole day trying to fix this or get online help but still not working.
Thanks in advance.