two rate - one to bill customer and one to pay drivers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a cartage rate field. I now have to one called billedcartagerate and
once called truckcartagerate. the billedcartagerate is what I bill the
customer and the truckcartage rate is what I pay the truck driver. Most of
the time these fields for each one given record are the same(what I want the
default to be) I would like to not even tab stop to the truckcartagerate but
have it Default to the billedcartagerate. However, if it needs to be
different I would like the input person to be able to override the default
and put in a value different from the billedcartage rate into the
truckcartage rate. I tried to make the default value for truckcartagerate
=[billedcartagerate] and/or the control source [billedcartedrate] but not
giving me what I want.

What am I missing????

Thanks,
Barb
 
In your form, use the AfterUpdate event procedure of the billedcartagerate
to assign the same value to the truckcartagerate.

The code in the event procedure will look like this:
Private Sub billedcartagerate_AfterUpdate()
Me.tructcartagerate = Me.billedcartagerate
End Sub

The reason you can't use the Default Value property is that this is too
early. Access assigns the default values as soon as you go to the new
record, which is before anything gets entered into the billedcartagerate
text box.
 
Back
Top