Save user input NOT default

P

Paul B.

I have previously posted this issue, but have not found a solution, so please
excuse the repeat....

On my form, the [Vehstatus] field has the default value set to
DLast_("[VehStatus]","tblVehicles","[VehicleNumber] =" & [VehicleNumber])

and I have a Disposition_AfterUpdate event of:

Private Sub Disposition_AfterUpdate( )

If [Disposition] = "Out of Service" Then

[VehStatus] = "Not In Service"

Else

[VehStatus] = "In Service"

End If

End Sub


So, the AfterUpdate event works fine, the textbox is updated if the user
changes the disposition, however, after saving the record to the
tblDispositions, I run several SQL statements such as:

DoCmd.RunSQL "UPDATE tblVehicles SET tblVehicles.VehStatus _
= [VehStatus]" & "WHERE ...criteria...."

All these work okay EXCEPT for the textboxes with default values. It does
not change the values in the tblVehicles to those input by the user.

Any suggestions?????


Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top