SQL Append looking for end of statment

Dim strSQL As String
    Dim RecordName,tableName As String
    RecordName = Me.rHid  'changed to Rused- name conflict?
    TableName= "table" & me.RN
        strSQL = "INSERT INTO tablename ( rHid, Fps1, Fps2, Fps3, Fps4, Fps5, Fps6, Fps7 )" _
       "SELECT test.rHid, test.Fps1, test.Fps2, test.Fps3, test.Fps4, test.Fps5, test.Fps6, test.Fps7" _
       "FROM test WHERE (((test.rHid)="RecordName"))"

 
    strSQL = "INSERT INTO tableName ( rHid, Fps1, Fps2, Fps3, Fps4, Fps5, Fps6, Fps7 )"
    strSQL = "SELECT test.rHid, test.Fps1, test.Fps2, test.Fps3, test.Fps4, test.Fps5, test.Fps6, test.Fps7"
    strSQL = "FROM test WHERE ((test.rHid) = "Rused"))"
                                                             highlights ^^^^^  
  CurrentDb.Execute strSQL, dbFailOnError
I tried extra ",extra() and spaces and  the two types above
BTY is one better than the other?
afreer2Asked:
Who is Participating?
 
knightEknightCommented:
did you try single-quotes?

strSQL = "FROM test WHERE test.rHid = 'Rused' "
0
 
knightEknightCommented:
... and you did have one extra ) in your last statement above, after .rHid
0
 
knightEknightCommented:
and if you need to use double-quotes, you need to double them up for VBScript:

    strSQL = "FROM test WHERE test.rHid = ""Rused"" "
0
 
afreer2Author Commented:
Single quote worked
Always can depend on Experts Exchange..
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.