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

Summary and Details need to combined in a query



 
 
Thread Tools Display Modes
  #1  
Old April 23rd, 2009, 05:47 PM posted to microsoft.public.access.queries
G
external usenet poster
 
Posts: 170
Default Summary and Details need to combined in a query

Hi again access experts;
I'm having a problem again and hopefully someone out there can give me a
solution. Here are the details:

I have two queries, 1 is getting the total number of call in a unit and the
other query is the whole details and they both from the same source Table1:

Table1
Site Unit Calls
1 A3 1
1 A3 1
1 B1 1
1 C2 1
2 E6 1
3 A3 1

'Qry1 and Qry2 have a parameter of what site (Like [Site]) could be 1 or
other site number and on this sample I selected site 1.

Qry1
Site Unit Calls
1 A3 2
1 B1 1
1 C2 1

Qry2
Site Unit Calls
1 A3 1
1 A3 1
1 B1 1
1 C2 1

This is the result I wanted by combining them together in one query:

Qry3
Qry2.Unit Qry2.Calls Qry1.Unit Qry1.Calls
A3 1 A3 2
A3 1 B1 1
B1 1 C2 1
C2 1

I'm thinking if I could add a running number expression on both query I can
join them both together and I don't know how to accomplish that. The reason
why I need to this because in my report I have to show both a detailed
information and summary in the same line.
If you guys have a better solution to accomplish my problem that would be
nice.

Thank you




 




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:40 AM.


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