M
mauricioff
I'm trying to transfer data from Access to Excel using
DoCmd.TransferSpreadsheet, I want to use a select query but it send an error
message, I can use already defined queries or table names, but for some
reason it won't let me use a sql select statement, eventhough it says I can
do so in the help file.
THIS DOESN'T WORK:
sSQL = "select * from qry_ANYQUERY"
DoCmd.TransferSpreadsheet acExport, , sSQL, sFile, True
THIS WORKS:
sSQL = "qry_ANYQUERY"
DoCmd.TransferSpreadsheet acExport, , sSQL, sFile, True
Can anybody help me?
DoCmd.TransferSpreadsheet, I want to use a select query but it send an error
message, I can use already defined queries or table names, but for some
reason it won't let me use a sql select statement, eventhough it says I can
do so in the help file.
THIS DOESN'T WORK:
sSQL = "select * from qry_ANYQUERY"
DoCmd.TransferSpreadsheet acExport, , sSQL, sFile, True
THIS WORKS:
sSQL = "qry_ANYQUERY"
DoCmd.TransferSpreadsheet acExport, , sSQL, sFile, True
Can anybody help me?