SQL to update a number of fields in a table

fat controller

Slightly round the bend..
Local time
Today, 21:43
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?
 
Seperate them with commas.

strSql = "UPDATE RouteRecords Set OperatingRestrictions1 = " & OpRes1 & ", MyNextField = " & MynextValue & " WHERE RouteRecordsID = " & varID
 
Champion! Thank you :)
 

Users who are viewing this thread

Back
Top Bottom