W
Walter
I have a form to enter service records for equipment.
There is a control for TruckID , one for TrailerID, and
one for Odometer. If a truck number is entered, I want to
disable the TrailerID and go to the Odometer control. I
put the following code in the AfterUpdate event of the
TruckID control.
Private Sub TruckID_AfterUpdate()
On Error GoTo Err_TruckID_AfterUpdate
'disables TrailerID and sets focus to Odometer
If IsNull(TruckID) = True Then
TrailerID.Enabled = True
Else
TrailerID.Enabled = False
Odometer.SetFocus
End If
Err_TruckID_AfterUpdate:
MsgBox Err.Description
Resume Exit_TruckID_AfterUpdate
End Sub
When I enter a truck number, I get the Error Msg: Compile
Error Label not defined. The Private Sub
TuckID_AfterUpdate() line is highlighted in yellow and the
Resume Exit_TruckID_AfterUpdate line is highlighted in
blue. I have looked at other sub routines and don't see
anything different about the way I have this written. Can
anyone tell me what is wrong?
Thanks a bunch,
Walter
There is a control for TruckID , one for TrailerID, and
one for Odometer. If a truck number is entered, I want to
disable the TrailerID and go to the Odometer control. I
put the following code in the AfterUpdate event of the
TruckID control.
Private Sub TruckID_AfterUpdate()
On Error GoTo Err_TruckID_AfterUpdate
'disables TrailerID and sets focus to Odometer
If IsNull(TruckID) = True Then
TrailerID.Enabled = True
Else
TrailerID.Enabled = False
Odometer.SetFocus
End If
Err_TruckID_AfterUpdate:
MsgBox Err.Description
Resume Exit_TruckID_AfterUpdate
End Sub
When I enter a truck number, I get the Error Msg: Compile
Error Label not defined. The Private Sub
TuckID_AfterUpdate() line is highlighted in yellow and the
Resume Exit_TruckID_AfterUpdate line is highlighted in
blue. I have looked at other sub routines and don't see
anything different about the way I have this written. Can
anyone tell me what is wrong?
Thanks a bunch,
Walter