Hello,
I have a database from which I am using the following line to export data:
Application.DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "output_query_1" , "G:\GroupA\AAA\Compliance.xls", True
This method worked for a long time, but today, for some reason, it treats each field in the query as if it were a parameter( opens an input box requesting values to be entered for each field name as though I were using [fieldname]). Strangely, if I change the fields to aliases (I think that is the correct term) so that Field1 is now Field1: Field1, then it works.
Also, without making the alias change above, the "outputto" command does export the query just fine. The query also opens without incident when just calling the Docnd.Openquery function.
Can someone tell me what is going on here? I suspect it may be a missing reference to a library, but I don't know. Any help is much appreciated.
Thank you,
Pat
I have a database from which I am using the following line to export data:
Application.DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "output_query_1" , "G:\GroupA\AAA\Compliance.xls", True
This method worked for a long time, but today, for some reason, it treats each field in the query as if it were a parameter( opens an input box requesting values to be entered for each field name as though I were using [fieldname]). Strangely, if I change the fields to aliases (I think that is the correct term) so that Field1 is now Field1: Field1, then it works.
Also, without making the alias change above, the "outputto" command does export the query just fine. The query also opens without incident when just calling the Docnd.Openquery function.
Can someone tell me what is going on here? I suspect it may be a missing reference to a library, but I don't know. Any help is much appreciated.
Thank you,
Pat