Dear Access Expert,
When I run the below code in Access 2003 all works great. The same Docmd line of code produces an error in Access 2007.
The error produced in Access 2007 is captured in the attached gif file.
According to the error I have to set the parameters of the query. Do I Have to create a query def and set the parameters? If so how do I make this work since the 3rd argument for TransferSpreadSheet is a String type.
Thank you for your advice.
When I run the below code in Access 2003 all works great. The same Docmd line of code produces an error in Access 2007.
The error produced in Access 2007 is captured in the attached gif file.
According to the error I have to set the parameters of the query. Do I Have to create a query def and set the parameters? If so how do I make this work since the 3rd argument for TransferSpreadSheet is a String type.
Thank you for your advice.
Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, strQueryName, strFilePath & "\" & strFileName, True