MS ACCESS Insert statement problem using Visual Basic 2010

Joined
Jun 17, 2011
Messages
2
Reaction score
0
Can someone please tell me what's wrong with this INSERT statement?

SQL = "INSERT INTO Needed (FirstName, LastName, City, State, Zip, Phone) VALUES ('" & FirstName & "','" & LastName & "','" & City & "','" & Zip & "','" & Phone & "')"

The VALUES of Firstname, LastName, City, Zip, and Phone are all string VARIABLES that contain a value set ahead of the INSERT statement. For the life of me, I can't get why this is NOT working. I can insert records using hardcoded info just fine, but when I try to do it with VARIABLES, doesn't work. Any help would be VERY MUCH appreciated!

Thank you,
Zcast
 
Back
Top