Peter said:
How can I export the results of a query into an excel spreadsheet
without changing or existing data in the spreadsheet. Basically the
query is only 5 columns by 60 rows and the rest of the spreadsheet is
already ocuupied with data.
Invoke the TransferSpreadsheet command in a macro.
Steps:
-make a new macro.
-in the Action column, select TransferSpreadsheet
-once you have selected this action you will see a series of parameter
fields below asking for details.
- Set the transfer type to Export
- Set the spreadsheet type to the Excel version you have
- Set the Table name to the name of your query
- Enter a file name. Access stinks when it comes to entering paths with
spaces in here, so either dont do it or post back to learn how to do it.
- Has field names, up to you, but see below for more on this
- Range, leave blank. Dont leave blank = error.
-save and close.
When you run this macro it will export your data to the top left of a (new)
worksheet in your spreadsheet named <name_of_your_query>. If you didnt
already have a worksheet with this name it makes a new one, and if you did
it replaces the existing data.
Regards
A