View Full Version : SQL help


mghdb
02-02-2001, 09:50 AM
I have a simple INSERT INTO code that should take the users name and insert into the Name table, but it's asking for the name twice. Below is the code, can anyone take a look and see what i'm missing.

Dim StrSQL As String
StrSQL = "INSERT INTO Table1 ( Name )" & " SELECT " & Me!Text2 & ""
DoCmd.RunSQL StrSQL

ElsVanMiert
02-06-2001, 11:36 AM
I think this is the biggest pitfall in ACCESS: NEVER EVER call a field or control NAME. This is a reserved word for ACCESS VBA and causes permanent headache.
Additionally, I think that quotation marks are necessary.