laurap
asked on
Insert Into statment - Error 3134 when inserting date field
What in the world is wrong with this simple line of code?
dbs.Execute "INSERT INTO tempBankStatement (category, amount, date) VALUES ('Beginning Balance', " & myBegBal & ", #" & StartDate & "#);"
it keeps running "Error 3134 syntax error in INSERT INTO STATEMENT"
i've been fooling around with this for an hour! it runs the error even if i insert a test date.
(eg.
dbs.Execute "INSERT INTO tempBankStatement (category, amount, date) VALUES ('Beginning Balance', " & myBegBal & ", #7/1/2000#);"
i've changed the format of the date, used chr(35) etc.
the statement works fine if i remove the date information.
help!
dbs.Execute "INSERT INTO tempBankStatement (category, amount, date) VALUES ('Beginning Balance', " & myBegBal & ", #" & StartDate & "#);"
it keeps running "Error 3134 syntax error in INSERT INTO STATEMENT"
i've been fooling around with this for an hour! it runs the error even if i insert a test date.
(eg.
dbs.Execute "INSERT INTO tempBankStatement (category, amount, date) VALUES ('Beginning Balance', " & myBegBal & ", #7/1/2000#);"
i've changed the format of the date, used chr(35) etc.
the statement works fine if i remove the date information.
help!
have you tried renaming your "date" column to something other than the keyword date?
ie)
INSERT INTO tempBankStatement (category, amount, myDate <--)
ie)
INSERT INTO tempBankStatement (category, amount, myDate <--)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for everyone's help..........
regards,