A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Routine to run/export queries



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2010, 02:58 PM posted to microsoft.public.access.forms
Mark Andrews[_4_]
external usenet poster
 
Posts: 169
Default Routine to run/export queries

Looking for some links to examples that do the following (or something
close):

1. user would create a whole bunch of queries themselves (using Access)
2. form that lets the user runs these queries to display results and/or
export
3. Would be good if user could select multiple queries and get multiple
resultsets to display or be exported to
an excel file with multiple worksheets. Example: user selects 5 queries and
wants an excel file made with 5 tabs with the 5 different outputs of the
queries, or the outputs of the 5 queries show in a form with multiple tabs
in Access (hide/show tabs, set recordsources at runtime etc...).

Perhaps ability to use a table to track:
- queryname
- short description
- long description
- sort order

so this table could be setup to be used in the multi-select list box in #2
above.

I don't need someone to explain how I would build this, just looking for
code in case someone already built this exact thing or something close.

Thanks in advance,
Mark


  #2  
Old May 26th, 2010, 04:34 PM posted to microsoft.public.access.forms
PieterLinden via AccessMonster.com
external usenet poster
 
Posts: 307
Default Routine to run/export queries

Mark Andrews wrote:
Looking for some links to examples that do the following (or something
close):

1. user would create a whole bunch of queries themselves (using Access)
2. form that lets the user runs these queries to display results and/or
export
3. Would be good if user could select multiple queries and get multiple
resultsets to display or be exported to
an excel file with multiple worksheets. Example: user selects 5 queries and
wants an excel file made with 5 tabs with the 5 different outputs of the
queries, or the outputs of the 5 queries show in a form with multiple tabs
in Access (hide/show tabs, set recordsources at runtime etc...).

Perhaps ability to use a table to track:
- queryname
- short description
- long description
- sort order

so this table could be setup to be used in the multi-select list box in #2
above.

I don't need someone to explain how I would build this, just looking for
code in case someone already built this exact thing or something close.

Thanks in advance,
Mark


Mark,
I did something like this with the paired listbox thing in ADH 2002 Desktop
Chapter 12.
I sent my data to Word, but not terribly different. Interface.. .right...
it's in there too. The MultiPik class. (Chapter 7).
I have a hopefully still working example I can send you if you want. It
"merges" a bunch of query results to a Word table... it's not the same, but
it does use methods of the ADO recordset that you an use in Excel.

Only hard part I found was that ADO does not seem to like Crosstab queries.
Or maybe I just didn't know where to find them in the ADO hierarchy.
(Entirely possible!) But since my crosstabs were fairly standard, I had an
empty table that I appended my crosstabs to and then used that to send the
data to Word.

HTH
Pieter

--
Message posted via http://www.accessmonster.com

  #3  
Old May 26th, 2010, 04:45 PM posted to microsoft.public.access.forms
Mark Andrews[_4_]
external usenet poster
 
Posts: 169
Default Routine to run/export queries

I would like to take a look at your example.

You can find my email on the contact page of the website.

--
Mark Andrews
RPT Software
http://www.rptsoftware.com

"PieterLinden via AccessMonster.com" u49887@uwe wrote in message
news:a896329722083@uwe...
Mark Andrews wrote:
Looking for some links to examples that do the following (or something
close):

1. user would create a whole bunch of queries themselves (using Access)
2. form that lets the user runs these queries to display results and/or
export
3. Would be good if user could select multiple queries and get multiple
resultsets to display or be exported to
an excel file with multiple worksheets. Example: user selects 5 queries
and
wants an excel file made with 5 tabs with the 5 different outputs of the
queries, or the outputs of the 5 queries show in a form with multiple tabs
in Access (hide/show tabs, set recordsources at runtime etc...).

Perhaps ability to use a table to track:
- queryname
- short description
- long description
- sort order

so this table could be setup to be used in the multi-select list box in #2
above.

I don't need someone to explain how I would build this, just looking for
code in case someone already built this exact thing or something close.

Thanks in advance,
Mark


Mark,
I did something like this with the paired listbox thing in ADH 2002
Desktop
Chapter 12.
I sent my data to Word, but not terribly different. Interface.. .right...
it's in there too. The MultiPik class. (Chapter 7).
I have a hopefully still working example I can send you if you want. It
"merges" a bunch of query results to a Word table... it's not the same,
but
it does use methods of the ADO recordset that you an use in Excel.

Only hard part I found was that ADO does not seem to like Crosstab
queries.
Or maybe I just didn't know where to find them in the ADO hierarchy.
(Entirely possible!) But since my crosstabs were fairly standard, I had
an
empty table that I appended my crosstabs to and then used that to send the
data to Word.

HTH
Pieter

--
Message posted via http://www.accessmonster.com

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.