P
Paul B.
Can someone please tell me what is wrong with the following:
Private Sub Disposition_AfterUpdate( )
If [Disposition] = "Out of Service" Then
[VehStatus] = "Not In Service"
Else
[VehStatus] = "In Service"
End If
DoCmd.RunSQL "UPDATE tblVehicles SET tblVehicles.VehStatus _
= [VehStatus]" & "WHERE ...criteria...."
End Sub
My code actually has other DoCmd.RunSQL lines in it that work fine, so I
know that part is okay.
My concern is that the default value of the textbox [VehStatus] is using
DLast to show the current value in the table and that the code above is not
holding the value set by the IF statements.
How would I fix this?
Cheers
Private Sub Disposition_AfterUpdate( )
If [Disposition] = "Out of Service" Then
[VehStatus] = "Not In Service"
Else
[VehStatus] = "In Service"
End If
DoCmd.RunSQL "UPDATE tblVehicles SET tblVehicles.VehStatus _
= [VehStatus]" & "WHERE ...criteria...."
End Sub
My code actually has other DoCmd.RunSQL lines in it that work fine, so I
know that part is okay.
My concern is that the default value of the textbox [VehStatus] is using
DLast to show the current value in the table and that the code above is not
holding the value set by the IF statements.
How would I fix this?
Cheers