Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Query Data from MS Query

I've been given a workbook that has a pivot table which gets its data
from an Access database by way of MS Query. Once the pivot table has
been updated it is sent to users who can view data based on the Month
and Year selected in the Page area.

I need to add a row that displays data outside of the pivot table,
based on the month and year the user has selected. The data I'm adding
is a summary of other data in the same dataset. I can capture the
month and year selected by the user, but I need to know how to access
the data. I'm thinking the data is in memory when the workbook is
being used. How do I get to it?

tod

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Query Data from MS Query

hi,
An MSQ returns a recordset and dumps in into excel. once the MSQ has
finished, it kills the record set so there would be nothing in memory for you
to get to.
The dataset is on your sheet. you can summerize it via macro or formulas.
a second suggestion would be a second MSQ that brings in the summary data
via access query instead of access tables.(i am not sure which you first MSQ
uses. both a viable import media) If you do have a second MSQ then you can
set both MSQs to run back to back with a single click.
my thoughts.
regards
FSt1

"todtown" wrote:

I've been given a workbook that has a pivot table which gets its data
from an Access database by way of MS Query. Once the pivot table has
been updated it is sent to users who can view data based on the Month
and Year selected in the Page area.

I need to add a row that displays data outside of the pivot table,
based on the month and year the user has selected. The data I'm adding
is a summary of other data in the same dataset. I can capture the
month and year selected by the user, but I need to know how to access
the data. I'm thinking the data is in memory when the workbook is
being used. How do I get to it?

tod


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Query Data from MS Query

Thanx for the info. This is what I don't get. The pivot table is
refreshed using the MS Query. But the data is still there even after
the workbook is not attached to any data source. So it has to be
someplace. It's in the pivot table, but there is no sheet of raw data,
not even a hidden sheet. I'm trying to access THAT data, wherever it
is. My alternate idea is to do similar to what you've said, have a
second query that gets the summary data I need at the same time the
pivot table is refreshed, put that summary data in a hidden sheet,
then have my vba code utilize that data. But I'd rather be able to
access the mystery super double hidden data that the pivot table is
reading. Am I making any sense?

tod

On Oct 2, 8:55 pm, FSt1 wrote:
hi,
An MSQ returns a recordset and dumps in into excel. once the MSQ has
finished, it kills the record set so there would be nothing in memory for you
to get to.
The dataset is on your sheet. you can summerize it via macro or formulas.
a second suggestion would be a second MSQ that brings in the summary data
via accessqueryinstead of access tables.(i am not sure which you first MSQ
uses. both a viable import media) If you do have a second MSQ then you can
set both MSQs to run back to back with a single click.
my thoughts.
regards
FSt1



"todtown" wrote:
I've been given a workbook that has a pivot table which gets its data
from an Access database by way of MSQuery. Once the pivot table has
been updated it is sent to users who can view data based on the Month
and Year selected in the Page area.


I need to add a row that displays data outside of the pivot table,
based on the month and year the user has selected. The data I'm adding
is a summary of other data in the same dataset. I can capture the
month and year selected by the user, but I need to know how to access
the data. I'm thinking the data is in memory when the workbook is
being used. How do I get to it?


tod- Hide quoted text -


- Show quoted text -



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use MS Query to query data within the current work book Steve Kesler Excel Discussion (Misc queries) 0 August 6th 09 05:22 PM
Importing Data via Web Query - Can values be passed to query? [email protected] Excel Discussion (Misc queries) 5 May 9th 06 06:21 PM
Save data retreived from query without saving query Anthony Excel Discussion (Misc queries) 0 January 25th 06 07:17 PM
How to Process Query Data after Query is Refreshed rajpuneyani Excel Programming 2 July 30th 04 02:13 PM
Query returning more data than will fit on worksheet with VBA DB query... ChrisSmith Excel Programming 0 June 8th 04 12:07 PM


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

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

About Us

"It's about Microsoft Excel"