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

Exporting to Excel 1

Status
Not open for further replies.

DBAMJA

Programmer
Jul 25, 2003
169
US
Hi everyone. Thanks in advance for any help that you can give me.

What I am trying to accomplish is this, I have a query that I need to export to excel. The problem is that I need to be able to qualify the query by store number (that's not hard) and export the store to the excel file. After that export, I need to move onto the next store number and export that to a new tab in the same excel file. Can't figure out how to accomplish this.

Any ideas?



[flush]

DBAMJA

It is said that God will give you no more than you can handle. I just wish God didn't have so much faith in me.
 


Hi,

Your data would be MUCH more useful, especially to an experienced user, if it were ALL IN ONE SHEET, where AutoFilter could display by StoreNbr or any other criteria(ae)

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
This file is for a call center that will be making followup calls by store. That is why I am trying to limit tabs by store.

[flush]

DBAMJA

It is said that God will give you no more than you can handle. I just wish God didn't have so much faith in me.
 
Access does it automatically.

DoCmd.TransferSpreadsheet acExport, 8, "MyStoreQry", "C:\My_Database\Store Data", True, "Store Number 1"

That above will create an excel file with a tab called "Store Number 1". If you run another query (e.g named "Store Number 2") it will create a new tab in the same file called "Store Number 2".





------------------------------------------------------------------------------
Ambition..........If you dont use it, you wont lose it
 

Hmmm... and the help files state this won't work!
I tried it and scottian is correct.


Randy
 
Thanks...worked just like I wanted.



[flush]

DBAMJA

It is said that God will give you no more than you can handle. I just wish God didn't have so much faith in me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top