aziz rasul
Active member
- Local time
- Today, 18:03
- Joined
- Jun 26, 2000
- Messages
- 1,935
I have the following code
I have a routine which now changes the name of the worksheet "qryClaimantNonClaimantReport4".
When I change the SQL of the query (using VBA) and retry the above code, the data is not transferred? However if I change the name of the query then it does.
Does anyone understand why the data can't be transferred on the second occasion without having to change the query name?
Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryClaimantNonClaimantReport4", strExcelFile, True
I have a routine which now changes the name of the worksheet "qryClaimantNonClaimantReport4".
When I change the SQL of the query (using VBA) and retry the above code, the data is not transferred? However if I change the name of the query then it does.
Does anyone understand why the data can't be transferred on the second occasion without having to change the query name?