G
Guest
This is in reference to a previous post "Bypassing Update" on 3/25. I copied
the code from the control to a sub in the general declarations section and
then called it from the On Current event of the form. When I open the form I
get an error message:
"The expression On Current you entered as the event property setting
produced the following error: Member already exist in an object module from
which this object module derives."
What am I doing wrong?
Below is my code:
Private Sub LastLocation()
If IsNull(DLookup("Odometer", "qryLastLocation")) Then
Me.LastOdometer = DLookup("BeginningOD", "tblTrucks", _
"TruckID='" & Me.TruckID & "'")
Me.LastLocation = DLookup("BeginningLocation &', ' &
BeginningState", _
"tblTrucks", "TruckID='" & Me.TruckID & "'")
Else
Me.LastOdometer = DLookup("Odometer", "qryLastLocation")
Me.LastLocation = DLookup("Location", "qryLastLocation")
End If
End Sub
Thanks for your help!
the code from the control to a sub in the general declarations section and
then called it from the On Current event of the form. When I open the form I
get an error message:
"The expression On Current you entered as the event property setting
produced the following error: Member already exist in an object module from
which this object module derives."
What am I doing wrong?
Below is my code:
Private Sub LastLocation()
If IsNull(DLookup("Odometer", "qryLastLocation")) Then
Me.LastOdometer = DLookup("BeginningOD", "tblTrucks", _
"TruckID='" & Me.TruckID & "'")
Me.LastLocation = DLookup("BeginningLocation &', ' &
BeginningState", _
"tblTrucks", "TruckID='" & Me.TruckID & "'")
Else
Me.LastOdometer = DLookup("Odometer", "qryLastLocation")
Me.LastLocation = DLookup("Location", "qryLastLocation")
End If
End Sub
Thanks for your help!