trickshot1126
Technical User
Hello and happy holiday weekend for us in the US.
I'm having an issue with some SQL code formatting. I am attempting to insert into a table where one of the values would be selected from another table and the remainders are set earlier in the SUB.
I have also tried
Any insight would be greatly appreciated.
Thanks for your time!
Rob
I'm having an issue with some SQL code formatting. I am attempting to insert into a table where one of the values would be selected from another table and the remainders are set earlier in the SUB.
Code:
TSsql = "INSERT INTO [tblFetchTimer]" _
& " SELECT LAST TS FROM tblPolNum WHERE tblPolNum.LANID='" & UsName & "' AND tblPolNum.PolNum='" & Me.txtPolNum & "', '" & UsName & "', '" & Me.txtPolNum & "', " & FtTime & ""
DoCmd.RunSQL TSsql
I have also tried
Code:
TSsql = "INSERT INTO [tblFetchTimer]" _
& " VALUES ((SELECT LAST TS FROM tblPolNum WHERE tblPolNum.LANID='" & UsName & "' AND tblPolNum.PolNum='" & Me.txtPolNum & "'), '" & UsName & "', '" & Me.txtPolNum & "', " & FtTime & ");"
DoCmd.RunSQL TSsql
Any insight would be greatly appreciated.
Thanks for your time!
Rob