Group:  Microsoft Access ยป microsoft.public.access.macros
Thread: theoretical question

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

theoretical question
Brian L 28.09.2006 13:23:02
I have never written a macro so I need some guidance please. I have a query
that pulls data for all of our marketing reps. The query sorts the results
based upon last name. What I would like to do, if possible, is export or
transfer to a spreadsheet the results but put each respective marketing reps
data on a seperate worksheet. Is this possible? If so, where should I begin?

Many thanks!
Re: theoretical question
"David F Cox" <nospam[ at ]please.com> 28.09.2006 14:07:01
It might be best to start from the Excel end and import the data to where
you want it. Excel is well equipped to handle this task in a variety of
ways. For one you can build queries as you want them using Microsoft query.


"Brian L" <BrianL[ at ]discussions.microsoft.com> wrote in message
news:FDAE2947-7645-4EC4-86A5-C752FC6D186A[ at ]microsoft.com...
[Quoted Text]
>I have never written a macro so I need some guidance please. I have a query
> that pulls data for all of our marketing reps. The query sorts the results
> based upon last name. What I would like to do, if possible, is export or
> transfer to a spreadsheet the results but put each respective marketing
> reps
> data on a seperate worksheet. Is this possible? If so, where should I
> begin?
>
> Many thanks!
>


Re: theoretical question
"DZA via AccessMonster.com" <u16254[ at ]uwe> 29.09.2006 13:30:21
Brian L wrote:
[Quoted Text]
>I have never written a macro so I need some guidance please. I have a query
>that pulls data for all of our marketing reps. The query sorts the results
>based upon last name. What I would like to do, if possible, is export or
>transfer to a spreadsheet the results but put each respective marketing reps
>data on a seperate worksheet. Is this possible? If so, where should I begin?
>
>Many thanks!

Actually, you probably won't need to write a macro (at least at this stage,
though you might want to have one apply some formatting later on...) As
David suggested, Excel can use Microsoft Query to retrieve data directly out
of your existing query (without modifying it at all) and filter the results
(in MS Query inside your spreadsheet) for a particular rep's name; just set
up the first one on one tab, then create a copy of that tab and edit the MS
Query filter to have *that* tab pull results for a *different* rep, and
repeat for however many reps you have. The really nice thing is that, when
you're done, you can update *ALL* the tabs at *ONCE* by just clicking the
"Refresh All" button on the "External Data" toolbar! (it might take a while,
depending on just how many records your currently existing query returns, etc.
so be patient...)

Good luck and have fun!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-macros/200609/1

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net