Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INSERT with reserved name

Status
Not open for further replies.

marsss

Programmer
Sep 24, 2004
116
US
One of my table have a field named "Date" which causing me some trouble when i try to create SQL query in my VBA code

since name is reserved, i do put the name between [], but it keep tell me i have to few value when i run the query

Code:
strSQL = "INSERT INTO tblDay (refSheet,[Date],Houre) VALUES (3,#2004-10-10#,0)"

but if i put that in a regulare query :
Code:
INSERT INTO tblDay (refSheet,[Date],Houre) VALUES (3,#2004-10-10#,0)
it work fine

Why my query called from VBA wont work...
 
Forgoet that... just see after couple trying to fix that the error msg was for anothing after the insert in my VBA code :( ayaye...
 
Edit: spelling heh

Forget that... just see after couple houres trying to fix that the error msg was for anothing after the insert in my VBA code :( ayaye...
 
Bleh, isn t my day..

try #3:


Forget that... just see after couple houres trying to fix that the error msg was for another thing after the insert in my VBA code :( ayaye...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top