SQL to update a number of fields in a table (1 Viewer)

fat controller

Slightly round the bend..
Local time
Today, 04:06
Joined
Apr 14, 2011
Messages
758
I am looking to update a number of fields in a table via VBA - the data values have already been captured, so it is just a case of updating the table with it.

I believe that the following will work to update one field:

Code:
UPDATE RouteRecords
Set OperatingRestrictions1 = OpRes1
WHERE RouteRecordsID = " & varID & ";"

But could I insert more lines between the 'Set' line and the 'WHERE' line?
 

moke123

AWF VIP
Local time
Yesterday, 23:06
Joined
Jan 11, 2013
Messages
3,935
Seperate them with commas.

strSql = "UPDATE RouteRecords Set OperatingRestrictions1 = " & OpRes1 & ", MyNextField = " & MynextValue & " WHERE RouteRecordsID = " & varID
 

fat controller

Slightly round the bend..
Local time
Today, 04:06
Joined
Apr 14, 2011
Messages
758
Champion! Thank you :)
 

Users who are viewing this thread

Top Bottom