Access macro to export to excel

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
 
G

Guest

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
 
G

Guest

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
 
G

Guest

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
 

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