garethdavies
New member
- Local time
- Today, 04:06
- Joined
- May 14, 2015
- Messages
- 1
I'm attempting to export some table queries to excel using the code I have posted below as a module.
I am getting an error saying it cannot find my query.
I have used this code to do the above on 2 queries within the same table and it works fine. I don't understand why it would not work for a different query.
Any help would be greatly appreciated.
Option Compare Database
Private Sub exportQueryToExcel()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "CUSTOMER FOCUS", "C:\Users\gareth.davies1\Desktop\Training\SHAREPOINT FEED MASTER.XLSM", True
End Sub
I am getting an error saying it cannot find my query.
I have used this code to do the above on 2 queries within the same table and it works fine. I don't understand why it would not work for a different query.
Any help would be greatly appreciated.
Option Compare Database
Private Sub exportQueryToExcel()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "CUSTOMER FOCUS", "C:\Users\gareth.davies1\Desktop\Training\SHAREPOINT FEED MASTER.XLSM", True
End Sub