I have a table called "T_Plate" with fields "Plate_Name" and "Checkout_Date" and "Checkout" (this is True/False field).
I have a form "F_update_checkout__Plates" with Textbox called "Text17" and a button called "Command19"
Now the user can fill in a plateName in "Text17" of the form fi "Plate_20" and push the button. The fields "Checkout_Date" should be updated to current date and "Checkout" should the checkbox be updated to False
This is the VB code I tried , but get an errormessage . Please some help.
Private Sub Command19_Click()
If IsNull(Me!Text17) Then
MsgBox "You must input a value to PlateName"
Else
CurrentDb.Execute "UPDATE T_Plate " & _
"SET T_plate.Checkout = False" And "Checkout_Date = Date" where T_Plate.Plate_Name = " &forms![F_update_checkout__Plates]![Text17], dbFailOnError"
End If
End Sub