selahlynch
Registered User.
- Local time
- Tomorrow, 01:20
- Joined
- Jan 3, 2010
- Messages
- 63
Hello,
I'm trying to export a crosstab query from a form in Access to an Excel spreadsheet.
Unfortunately the following code did not work:
It gave me an error "Run-time error '3011: The microsoft engine could not find the object 'SELECT * FROM AllPossibilitiesAttendance WHERE isSS; '..."
I'd like to keep my query as a variable within the code, because the query is dynamic; it is modified as a result of selections that are made on the form.
Any suggestions?
I'm trying to export a crosstab query from a form in Access to an Excel spreadsheet.
Unfortunately the following code did not work:
Code:
sqlquery = "SELECT * FROM AllPossibilitiesAttendance WHERE isSS"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, sqlquery, "C:\AllPossibilitiesAttendance.xls", True
I'd like to keep my query as a variable within the code, because the query is dynamic; it is modified as a result of selections that are made on the form.
Any suggestions?
Last edited: