Access macro to export to excel

  • Thread starter Thread starter kimbobo
  • Start date Start date
K

kimbobo

I have a query with a field that has 118 different values. I need to
filter by each of the 118 different values and export the results into
separate excel workbooks.

I would love a macro that does this...but I only have written macros
for excel.

Any ideas?

Thanks!

-Kim
 
Hi Kimbobo - actually you'll find writing macros in Access easier than Excel
as the commands are listed and you can't really go wrong.

Start by creating a query to filter your data

In Macros start a new macro use the OutputTo command - filling in the Action
Arguements box is easy, put Query in Object Tyupe, your query name in Object
Name, etc

You can end up with 118 queries for the filters, and 118 lines in your macro
exporting to the separate files and have the macro do it all, one after each
other

Hope this gets you started - I think you'll have no problem.

Yours -- Dika
 
Kernow Girl,

Hoping you can help!!!

When I try to run the macro with the outputTo command I keep getting an
error that Access can't save the output data to the file you've
selected...*The file may be open
 
Hi Pants - sorry for not getting back till now - was home with a sick car!
What are you outputting to? Excell? What commands are in the macro prior to
the OutputTo command?
Yours - Dika
 
Back
Top