D
Doug
I have a form that I would like to use to populate values
to a table. One of the fields should be populated with a
value based on data entered in 3 fields of the same form.
I have created the following code for a 'got focus' event
for this field, however whenever I get to this field in
the form nothing happens.
What am I doing wrong?
Thanks in advance for any help you can provide.
Private Sub RatePerMile_GotFocus()
Dim Rate As Variant
Dim strloadsite As String
Dim strshipto As String
Dim strtrailer As String
strloadsite = Me.load_site
strshipto = Me.Ship_To_State
strtrailer = Me.Trailer_Type
Rate = "Select [rate] from FrtPrgRates where [state] =
strshipto And [location] = strloadsite And [trailer] =
strtrailertype;"
End Sub
to a table. One of the fields should be populated with a
value based on data entered in 3 fields of the same form.
I have created the following code for a 'got focus' event
for this field, however whenever I get to this field in
the form nothing happens.
What am I doing wrong?
Thanks in advance for any help you can provide.
Private Sub RatePerMile_GotFocus()
Dim Rate As Variant
Dim strloadsite As String
Dim strshipto As String
Dim strtrailer As String
strloadsite = Me.load_site
strshipto = Me.Ship_To_State
strtrailer = Me.Trailer_Type
Rate = "Select [rate] from FrtPrgRates where [state] =
strshipto And [location] = strloadsite And [trailer] =
strtrailertype;"
End Sub