Error: Syntax error in INSERT INTO statement
I have this VBA to create an SQL string, it worked but I added a new field to my table but I can't get it to load. The new Field is: option it is a Text data type in the table.
this is the output in the Immediate window.....
insert into tblUpdateLog(user,starttime,endtime,duration,option)Values('ziggy',#07/01/2010 9:31:27 AM#,#07/01/2010 9:31:27 AM#,0,'TEST')
Thanks
I have this VBA to create an SQL string, it worked but I added a new field to my table but I can't get it to load. The new Field is: option it is a Text data type in the table.
Code:
strSQL = "insert into tblUpdateLog(user,starttime,endtime,duration,option)"
strSQL = strSQL + "Values(" & "'" & GetUserName & "'" & "," & "#" & stTime & "#" & "," & "#" & EnTime & "#" & "," & Dur & ",'TEST'" & ")"
this is the output in the Immediate window.....
insert into tblUpdateLog(user,starttime,endtime,duration,option)Values('ziggy',#07/01/2010 9:31:27 AM#,#07/01/2010 9:31:27 AM#,0,'TEST')
Thanks