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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access macro to an excel spreadsheet 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am trying to convert queries in access to a spreadheet format in microsoft excel. I am using an "output to" macro to accomplish this goal and it is working. But, here is my problem: I have many queries in my database, and I need each individual query to transfer its information to a "particular" microsoft excel worksheet tabs. For example, I need query 1 to be placed on excel worksheet#1, query 2 on worksheet#2 and so on. All of these queries need to be on separate worksheets in ONE excel file. Can anyone help:)???
 
I do this by using DoCmd.TransferSpreadsheet to one file. Then I place the queries or tables in order by the sheet I want them to appear on. for example:
DoCmd.transferspreadsheet acexport, 8, "KeyDistributionExternal", "j:\gta users\gtars\StrategicPlanningKeys.xls:, False, ""
DoCmd.transferspreadsheet acexport, 8, "KeyBusinessFunction", "j:\gta users\gtars\StrategicPlanningKeys.xls:, False, ""
DoCmd.transferspreadsheet acexport, 8, "KeyCriticalSuccessFactors", "j:\gta users\gtars\StrategicPlanningKeys.xls:, False, ""

This creates 3 keys in one spreadsheet and the keys are on separate sheet tabs and in the order specified above.

Sharon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top