Run time error 3011

detrie

Registered User.
Local time
Yesterday, 20:01
Joined
Feb 9, 2006
Messages
113
I'm getting a Run-time error '3011'
The Microsoft Office Access database engine could not find the object 'strMatrix'. Make sure the object exists and that you spell its name and the path name correctly.

Can someone tell me what I'm missing?

Code:
Dim strMatrix as String

strMatrix = "SELECT ..."

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "strMatrix", c:\Matrix.xls", True
 
In plain English what are you trying to do???
 
I have a string "strMatrix" which is an SQL Select Statement

I am trying to export the results of strMatrix to an Excel (2003) named range "Matrix" in c:\Matrix.xls

Originally, "strMatrix" was a select query and the Docmd... worked fine.
I copied the select SQL Statement and Dim'd it as strMatrix, renamed the select query and that produced the error
 

Users who are viewing this thread

Back
Top Bottom