Matching fields to display results

wwwredback

Registered User.
Local time
Today, 19:01
Joined
Apr 28, 2009
Messages
37
Hello all,

I'm after yet more help if I may.

I have a ship address which includes a field called:

ShipRegion from a table called tblOrders

I also have a field called Freight on my form (frmOrders)

What I would like to do is gather the information from the ShipRegion and place it into the Freight Field on the form but it is not just a simple record source. I have set up a table called DeliveryPrices and have got 3 fields:

DeliveryID
DeliveryArea
DeliveryAmount

What I need to do it say for example:

ShipRegion = ‘London’

London = $5.00

Then place the $5.00 into the freight field.

Can anyone please help with the code etc to help me on my way.

Thanks a million in advance for any takers.

Cheers

James.
 
Put the shipping address into fields on the form.

In the ControlSource of the Freight field enter
=DLookup("DeliveryAmount", "DeliveryPrices" , "DeliveryPrices.DeliveryArea = Forms!FrmOrders.ShipRegion")
 
Thank you so much, it works a treat.

THanks a million, your a star.

Cheers

James.
 

Users who are viewing this thread

Back
Top Bottom