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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Pulling report from 2 queries, one with a Sum



 
 
Thread Tools Display Modes
  #1  
Old November 19th, 2008, 10:46 PM posted to microsoft.public.access.reports
Aaron Connell
external usenet poster
 
Posts: 1
Default Pulling report from 2 queries, one with a Sum

In MS Access 2003 I'm trying to make a Report pulling from 2 queries. One
query pulls from a table of offices with their authorized staffing amounts.
The other query pulls from a query that pulls the Sum of the number of times
each office appears in a table. When I make the report, pulling from the 2
queries, the report comes out blank. I'm trying to report 3 columns - the
list of offices, authorized staffing per office, number of times office
appears in the master table of all employees. Any idea what I'm missing?
  #2  
Old November 20th, 2008, 02:00 PM posted to microsoft.public.access.reports
tkelley via AccessMonster.com
external usenet poster
 
Posts: 150
Default Pulling report from 2 queries, one with a Sum

So you've created a thrid query from the two by linking their like ID field,
and are using that third query as the report's source?

Aaron Connell wrote:
In MS Access 2003 I'm trying to make a Report pulling from 2 queries. One
query pulls from a table of offices with their authorized staffing amounts.
The other query pulls from a query that pulls the Sum of the number of times
each office appears in a table. When I make the report, pulling from the 2
queries, the report comes out blank. I'm trying to report 3 columns - the
list of offices, authorized staffing per office, number of times office
appears in the master table of all employees. Any idea what I'm missing?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200811/1

  #3  
Old November 20th, 2008, 09:42 PM posted to microsoft.public.access.reports
Aaron Connell[_2_]
external usenet poster
 
Posts: 9
Default Pulling report from 2 queries, one with a Sum

Correct. However, the third query is blank, thus the related report is also
blank. I've also tried making the report from the 2 original queries, with
the same blank result. Thanks for responding.

"tkelley via AccessMonster.com" wrote:

So you've created a thrid query from the two by linking their like ID field,
and are using that third query as the report's source?

Aaron Connell wrote:
In MS Access 2003 I'm trying to make a Report pulling from 2 queries. One
query pulls from a table of offices with their authorized staffing amounts.
The other query pulls from a query that pulls the Sum of the number of times
each office appears in a table. When I make the report, pulling from the 2
queries, the report comes out blank. I'm trying to report 3 columns - the
list of offices, authorized staffing per office, number of times office
appears in the master table of all employees. Any idea what I'm missing?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200811/1


  #4  
Old November 20th, 2008, 10:32 PM posted to microsoft.public.access.reports
tkelley via AccessMonster.com
external usenet poster
 
Posts: 150
Default Pulling report from 2 queries, one with a Sum

We're both missing something, it sounds straight forward. I think you're
going to have to post the SQL for each of the queries.

tkelley wrote:
So you've created a thrid query from the two by linking their like ID field,
and are using that third query as the report's source?

In MS Access 2003 I'm trying to make a Report pulling from 2 queries. One
query pulls from a table of offices with their authorized staffing amounts.

[quoted text clipped - 3 lines]
list of offices, authorized staffing per office, number of times office
appears in the master table of all employees. Any idea what I'm missing?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200811/1

  #5  
Old November 21st, 2008, 04:05 PM posted to microsoft.public.access.reports
Aaron Connell[_2_]
external usenet poster
 
Posts: 9
Default Pulling report from 2 queries, one with a Sum

FTEs Query pulls the total FTEs from the FTE query and works:
SELECT DISTINCTROW FTEs.Office, Sum(FTEs.FTE) AS [Sum Of FTE]
FROM FTEs
GROUP BY FTEs.Office;

AuthorizedFTE Query pulls the number of Authorized employees per office and
it also works:
SELECT AuthorizedFTE.Office, AuthorizedFTE.AuthorizedFTE
FROM AuthorizedFTE;

FTEs Query Query1 is supposed to pull from the 2 queries shown above, but i
just shows 3 column headings and nothing else. I've tried several
combinations:
SELECT [FTEs Query].Office, [FTEs Query].[Sum Of FTE],
AuthorizedFTE.AuthorizedFTE
FROM AuthorizedFTE INNER JOIN [FTEs Query] ON AuthorizedFTE.Office = [FTEs
Query].Office;


Do the tables they pull from have to be in the same alphabetic order, i.e.
Office name showing from A-Z? Again, thanks for looking at this. ac


"tkelley via AccessMonster.com" wrote:

We're both missing something, it sounds straight forward. I think you're
going to have to post the SQL for each of the queries.

tkelley wrote:
So you've created a thrid query from the two by linking their like ID field,
and are using that third query as the report's source?

In MS Access 2003 I'm trying to make a Report pulling from 2 queries. One
query pulls from a table of offices with their authorized staffing amounts.

[quoted text clipped - 3 lines]
list of offices, authorized staffing per office, number of times office
appears in the master table of all employees. Any idea what I'm missing?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200811/1


  #6  
Old November 21st, 2008, 04:53 PM posted to microsoft.public.access.reports
tkelley via AccessMonster.com
external usenet poster
 
Posts: 150
Default Pulling report from 2 queries, one with a Sum

I'm still stumped. But this has me confused:

================
AuthorizedFTE Query pulls the number of Authorized employees per office and
it also works:
SELECT AuthorizedFTE.Office, AuthorizedFTE.AuthorizedFTE
FROM AuthorizedFTE;
================
The name of your query is "AuthorizedFTE" ... but it's selecting from a table
called "AuthorizedFTE" ? Can you confirm that. I didn't even think that was
possible.


Aaron Connell wrote:
FTEs Query pulls the total FTEs from the FTE query and works:
SELECT DISTINCTROW FTEs.Office, Sum(FTEs.FTE) AS [Sum Of FTE]
FROM FTEs
GROUP BY FTEs.Office;

AuthorizedFTE Query pulls the number of Authorized employees per office and
it also works:
SELECT AuthorizedFTE.Office, AuthorizedFTE.AuthorizedFTE
FROM AuthorizedFTE;

FTEs Query Query1 is supposed to pull from the 2 queries shown above, but i
just shows 3 column headings and nothing else. I've tried several
combinations:
SELECT [FTEs Query].Office, [FTEs Query].[Sum Of FTE],
AuthorizedFTE.AuthorizedFTE
FROM AuthorizedFTE INNER JOIN [FTEs Query] ON AuthorizedFTE.Office = [FTEs
Query].Office;

Do the tables they pull from have to be in the same alphabetic order, i.e.
Office name showing from A-Z? Again, thanks for looking at this. ac

We're both missing something, it sounds straight forward. I think you're
going to have to post the SQL for each of the queries.

[quoted text clipped - 7 lines]
list of offices, authorized staffing per office, number of times office
appears in the master table of all employees. Any idea what I'm missing?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200811/1

  #7  
Old November 21st, 2008, 05:28 PM posted to microsoft.public.access.reports
Aaron Connell[_2_]
external usenet poster
 
Posts: 9
Default Pulling report from 2 queries, one with a Sum

That is correct, the table and the query have the same name and it doesn't
cause a problem with the query. ac

"tkelley via AccessMonster.com" wrote:

I'm still stumped. But this has me confused:

================
AuthorizedFTE Query pulls the number of Authorized employees per office and
it also works:
SELECT AuthorizedFTE.Office, AuthorizedFTE.AuthorizedFTE
FROM AuthorizedFTE;
================
The name of your query is "AuthorizedFTE" ... but it's selecting from a table
called "AuthorizedFTE" ? Can you confirm that. I didn't even think that was
possible.


Aaron Connell wrote:
FTEs Query pulls the total FTEs from the FTE query and works:
SELECT DISTINCTROW FTEs.Office, Sum(FTEs.FTE) AS [Sum Of FTE]
FROM FTEs
GROUP BY FTEs.Office;

AuthorizedFTE Query pulls the number of Authorized employees per office and
it also works:
SELECT AuthorizedFTE.Office, AuthorizedFTE.AuthorizedFTE
FROM AuthorizedFTE;

FTEs Query Query1 is supposed to pull from the 2 queries shown above, but i
just shows 3 column headings and nothing else. I've tried several
combinations:
SELECT [FTEs Query].Office, [FTEs Query].[Sum Of FTE],
AuthorizedFTE.AuthorizedFTE
FROM AuthorizedFTE INNER JOIN [FTEs Query] ON AuthorizedFTE.Office = [FTEs
Query].Office;

Do the tables they pull from have to be in the same alphabetic order, i.e.
Office name showing from A-Z? Again, thanks for looking at this. ac

We're both missing something, it sounds straight forward. I think you're
going to have to post the SQL for each of the queries.

[quoted text clipped - 7 lines]
list of offices, authorized staffing per office, number of times office
appears in the master table of all employees. Any idea what I'm missing?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200811/1


  #8  
Old November 21st, 2008, 05:33 PM posted to microsoft.public.access.reports
tkelley via AccessMonster.com
external usenet poster
 
Posts: 150
Default Pulling report from 2 queries, one with a Sum

Ok, so indulge me and rename the query to "qry..." and see what happens in
your third query. That's an ambiguous reference, and I'd be shocked if any
expert came in here and suggested it was fine.

Anyway, like I said, indulge me and try it.

Aaron Connell wrote:
That is correct, the table and the query have the same name and it doesn't
cause a problem with the query. ac

I'm still stumped. But this has me confused:

[quoted text clipped - 34 lines]
list of offices, authorized staffing per office, number of times office
appears in the master table of all employees. Any idea what I'm missing?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200811/1

  #9  
Old November 21st, 2008, 05:58 PM posted to microsoft.public.access.reports
Aaron Connell[_2_]
external usenet poster
 
Posts: 9
Default Pulling report from 2 queries, one with a Sum

Same result (frustrating!):
SELECT [FTEs Query].Office, [FTEs Query].[Sum Of FTE], qry.AuthorizedFTE
FROM qry INNER JOIN [FTEs Query] ON qry.Office = [FTEs Query].Office;

ac

"tkelley via AccessMonster.com" wrote:

Ok, so indulge me and rename the query to "qry..." and see what happens in
your third query. That's an ambiguous reference, and I'd be shocked if any
expert came in here and suggested it was fine.

Anyway, like I said, indulge me and try it.

Aaron Connell wrote:
That is correct, the table and the query have the same name and it doesn't
cause a problem with the query. ac

I'm still stumped. But this has me confused:

[quoted text clipped - 34 lines]
list of offices, authorized staffing per office, number of times office
appears in the master table of all employees. Any idea what I'm missing?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200811/1


  #10  
Old November 21st, 2008, 06:26 PM posted to microsoft.public.access.reports
tkelley via AccessMonster.com
external usenet poster
 
Posts: 150
Default Pulling report from 2 queries, one with a Sum

Make sure your Office fields are indeed equal. For that field, does either
table have trailing spaces or something like that?

Aaron Connell wrote:
Same result (frustrating!):
SELECT [FTEs Query].Office, [FTEs Query].[Sum Of FTE], qry.AuthorizedFTE
FROM qry INNER JOIN [FTEs Query] ON qry.Office = [FTEs Query].Office;

ac

Ok, so indulge me and rename the query to "qry..." and see what happens in
your third query. That's an ambiguous reference, and I'd be shocked if any

[quoted text clipped - 10 lines]
list of offices, authorized staffing per office, number of times office
appears in the master table of all employees. Any idea what I'm missing?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200811/1

 




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 08:36 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.