Run-time error 3129 - Invalid SQL statement

Scaniafan

Registered User.
Local time
Today, 12:29
Joined
Sep 30, 2008
Messages
82
Good morning :)

I've got a small and probably easy-to-solve Monday-morning problem, giving me an headache and a run-time error 3129 (Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.)

Code:
Dim strSQLCollection As String
                    
            strSQLCollection = "SELECT QRY_Gross_Performance_Collection.* FROM QRY_Gross_Performance_Collection WHERE (((QRY_Gross_Performance_Collection.[Forwarding agent])='Test'));"
                    
            DoCmd.RunSQL "strSQLCollection"

What am I doing wrong here?
 
Remove the "
Code:
DoCmd.RunSQL [COLOR=Red][B]"[/B][/COLOR]strSQLCollection[B][COLOR=Red]"[/COLOR][/B]
 
Aaaargh..... :banghead: Thank you!
 
Yes - Monday morning....! :D
 

Users who are viewing this thread

Back
Top Bottom