L
Lory
I am getting a run-time error 3134 "Syntax Error in Insert
Into statement"
Here is my code:
strSQL = "Insert into CurInventory_tbl(Style, Description,
QtyOnHand, Date, UserName) " & _
"SELECT '" & colStyle(intCounter) & "', '" &
txtDescription & _
"', " & colCurQty(intCounter) & ", " & Now() & _
", '" & CurrentUser() & "'"
DoCmd.RunSQL strSQL
I've checked my table and field names to make sure i
spelled them correctly. When I check in the immediate
window to see what is in strSQL it looks fine.
Here's what the immediate window shows:
Insert into CurInventory_tbl(Style, Description,
QtyOnHand, Date, UserName) SELECT 'F3N', 'TKCAP WD', 250,
08/23/04 8:46:00 AM, 'LMaxson'
The only thing I thought might be a problem was if the
date needed quotes around it so I tried it with quotes and
without but am still getting the same error.
Into statement"
Here is my code:
strSQL = "Insert into CurInventory_tbl(Style, Description,
QtyOnHand, Date, UserName) " & _
"SELECT '" & colStyle(intCounter) & "', '" &
txtDescription & _
"', " & colCurQty(intCounter) & ", " & Now() & _
", '" & CurrentUser() & "'"
DoCmd.RunSQL strSQL
I've checked my table and field names to make sure i
spelled them correctly. When I check in the immediate
window to see what is in strSQL it looks fine.
Here's what the immediate window shows:
Insert into CurInventory_tbl(Style, Description,
QtyOnHand, Date, UserName) SELECT 'F3N', 'TKCAP WD', 250,
08/23/04 8:46:00 AM, 'LMaxson'
The only thing I thought might be a problem was if the
date needed quotes around it so I tried it with quotes and
without but am still getting the same error.