Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Export to Excel

Status
Not open for further replies.

Prufrock

Instructor
Sep 4, 2002
77
AU
In an Access database I have lists that are generated for a range of training programs. Usually the user just click a drop down list and selects the program, a query runs and a report is previewed showing the list of participants in a certain order.

I can get the user to then export to excel and the list is available then in excel for other users to peruse. We don't want them entering the database. Can I streamline the process so that the full range of programs can be exported to excel either with macro or code?

I am aware of Transferspreadsheet coding but not sure whether I can do a whole range of programs lists in one hit.
 
Hi,

You can do this by writing a couple of procedures. The first would be to create a recordset that will capture each of your programmes and then you could pass each record in that into a second procedure using the programme name as a variable in this procedure you would simply have the

docmd.OutputTo, acOutputReport, Variable?, format, location

if you format the now function to ddmmyyhhmmss and bolt this on the end of the name of your variable then you will have a new file name each time this runs...........

cheers

xuereveds
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top