New named File macro

G

Guest

Original: Is there a way to write a macro that will run a query and then
save it to a
server file and name it the date it was ran? The first answer gave me:

You can output the data returned by a query as a text file, using a
TransferText action in your macro. Is that what you want? If so, you
can enter the equvalent of the following in the File Name argument of
the macro... ="D:\YourFolder\" & Format(Date(),"yyyymmdd") & ".txt"
(I don't want a txt file so the next answer gave me help for Excel:
TransferSpreadsheet is the macro action to export a table or query into an
EXCEL workbook.

This is what I am doing and I am so confused:

The query runs to pull out information in which I am using a make table
query to create me a new table with updated information, I then want to
create a macro to run this query, create the new table and export to excel
using the DATE it is ran as the excel name. This will allow me to keep
history.
This is what I have: I am using the transferspreadsheet and
In the File Name argument:
="\\pdis2k21\data\da_IncidentList\" & Format(Date(),"yyyymm") & ".xls"
it runs me throught the query and table update but it does not create me a
workbook, please tell me what I am doing wrong. Thanks,
 
S

Steve Schapel

Pam,

I assume you are using the table created by the Make-Table query in the
Table Name argument of the TransferSpreadsheet macro? Can you give us
the full details of the macro, all actions and specified arguments? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top