Hi all,
Is there any reason why this wont work?
idh is a text box on the form that is linked to the ID field of the table.
Main is the table
Out is a field name
All I want to do on the form is click a button and it changes 1 field on the relavent record.
Many thanks
Martin
Is there any reason why this wont work?
Code:
Dim SQL As String
Dim IDhere As String
IDhere = idh
SQL = "UPDATE Main SET Main.Out = 0 WHERE Main.ID = 'IDhere'"
DoCmd.RunSQL SQL
DoCmd.Close acForm, "Loggedout"
idh is a text box on the form that is linked to the ID field of the table.
Main is the table
Out is a field name
All I want to do on the form is click a button and it changes 1 field on the relavent record.
Many thanks
Martin