SQL help

mghdb

Registered User.
Local time
Today, 09:54
Joined
Aug 3, 2000
Messages
26
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
 
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.
 

Users who are viewing this thread

Back
Top Bottom