I have multiple queries that I have made and want them all to be exported to a new excel file each time the process is ran. Each query should be have its own sheet.
How should I do this?
I have multiple queries that I have made and want them all to be exported to a new excel file each time the process is ran. Each query should be have its own sheet.
How should I do this?
In Access 2007 and after this need is particularly easy - you just do it manually once and then the wizard prompts you to save those steps and name them as an Export Spec - which thereafter can be fired like any macro.
In Access 2003 and before one uses the Transfer Spreadsheet method; you'll want to look that up in VBA help.
I found some information on the below, but name of worksheet doesn't see to work for me.
DoCmd.TransferSpreadsheet {Direction of Transfer}, _ {SpreadSheet Type}, {Query to Select Data}, _ {Full Name of Excel WorkBook, True, {Name of WorkSheet}