Question Export Query to Excel with several variables

Styles

Member
Joined
Sep 23, 2010
Messages
16
Programming Experience
Beginner
I am trying to find the best way to take an Access query and export it to Excel. The problem is that I have odd requirements for my final Excel sheet.

My query has about 90 records at a given time. There are 6 columns total; Company name, Primary phone, Secondary phone, City, town code and Active. The Active column is formatted yes/no and only shows active companies in the query.

I want to take this and put it into a pre-formatted Excel spreadsheet with multiple tabs based on city. So there may only be 4 records for "City A" but 10 for "City B". I only need the Company Name, and 2 phone numbers from the query, since the tab shows the city as well as the header. To make it more difficult the 3 fields need to go into the first column only of the spreadsheet and be in a specific order (City A, City C, City B) as the rest of the spreadsheet needs to be hand filled. Since the order has to be specific would I be better off maxing another column in my Access database so when I export the data i can assign it to the correct row? Is there an easy way to accomplish this? I have some very minor experience with VBA.NET as well. I can also post screen shots if necessary. Thank you for any help you can offer.
 
Back
Top