Hi
I'm getting an Expected End of Statement error on the second RunSQL statement shown below. I broke these apart for troubleshooting. The first statement runs fine using Integer data. The second statement, which is String data, does not run. I have not been able to find anything on-line so far to correct this error.
Also, I would like to combine these into a single statement and would appreciate suggestions for syntax.
Dim vlast, vLotID
vlast = Me.Last 'Last is integer
vLotID = Me.LotID 'LotID is string
DoCmd.RunSQL "UPDATE tblMachines SET tblMachines.LastNo =" & vlast & " WHERE MachineID = '" & Me.MachID & "'"
DoCmd.RunSQL "UPDATE tblMachines SET tblMachines.LastLotID = '" & vLotID & "'" WHERE MachineID = '" & Me.MachID & "'"
Many thanks!