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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using TEXT fields in INSERT INTO's?

Status
Not open for further replies.

tbpcpa

Instructor
Oct 8, 2002
19
US
I have stumped my toes enough on this one.... can someone else please look at this and tell me where the syntax error is....


db.Execute "INSERT INTO Roster ([League Code]) VALUES (" '" & txtLeagueCode.text & "'")"

If I change it to...

db.Execute "INSERT INTO Roster ([League Code]) VALUES ('1')" .... it works fine.....

Where am I missing it at?
 
I think that you have too many quotes. Try

db.Execute "INSERT INTO Roster ([League Code]) VALUES ('" & txtLeagueCode.text & "')"
Thanks and Good Luck!

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top