Problem with Update Error '3144'
Posted on 2008-10-10
I Cannot find the correct syntax to fix the problem i'm having. i'm using a update query to change a variable. The strFieldName is the field name A1 throught A80.
Dim txtName As String
Dim strFieldName As String
txtName = Me.txtSelectedText1.ControlSource
strFieldName = Mid(txtName, 4, 3)
DoCmd.RunSQL "UPDATE VehicleEquip SET VehicleEquip.( " & strFieldName & " ) = False;"
the code works if there is a spacific field (eg."UPDATE VehicleEquip SET VehicleEquip.A41 = False;")
but i need it to work for all of them.
i'm aware that i can create a recordset and then loop through them, but this seemed easier, although now its not.....