multiple queries in single report

  • Thread starter Thread starter Kathy
  • Start date Start date
K

Kathy

How can you get the results of separate queries in the
same report? The wizard could not combine them.

I had to create successive queries to get the end result I
was looking for, then used the last query for each
report. I have 2 separate reports with a single field on
each, that I'd like to combine into one report.

If it helps to know specifically, this is what it does:

Using a date prompt: (to run daily, weekly and monthly)
test for the following

'status of activity' = 'closed',
'type of contact' = 'phone' or 'email'
Difference in start time and closed time in hours
If type of contact is phone, count of those with closed
time less than 3 hours? (this number currently feeds one
report)
If type of contact is email, count of those with closed
time less than 72 hours? (this number is used in second
report)

Any guidance is appreciated!
 
I'm not sure why you need more than one query:
Select Sum(Abs([Closed]-[Start]<.125 AND [Contact]="Phone")) as
Closed3HrPhone,
Sum(Abs([Closed]-[Start]<3 AND [Contact]="Email")) as Closed3DayEMail
FROM tblYourTable
WHERE [Closed] is not Null;
 
Can you recommend a good resource for learning this? All
my books seem to avoid sql part of Access.

This is much simpler, Thank You!

-----Original Message-----
I'm not sure why you need more than one query:
Select Sum(Abs([Closed]-[Start]<.125 AND [Contact] ="Phone")) as
Closed3HrPhone,
Sum(Abs([Closed]-[Start]<3 AND [Contact]="Email")) as Closed3DayEMail
FROM tblYourTable
WHERE [Closed] is not Null;

--
Duane Hookom
MS Access MVP
--

How can you get the results of separate queries in the
same report? The wizard could not combine them.

I had to create successive queries to get the end result I
was looking for, then used the last query for each
report. I have 2 separate reports with a single field on
each, that I'd like to combine into one report.

If it helps to know specifically, this is what it does:

Using a date prompt: (to run daily, weekly and monthly)
test for the following

'status of activity' = 'closed',
'type of contact' = 'phone' or 'email'
Difference in start time and closed time in hours
If type of contact is phone, count of those with closed
time less than 3 hours? (this number currently feeds one
report)
If type of contact is email, count of those with closed
time less than 72 hours? (this number is used in second
report)

Any guidance is appreciated!


.
 
http://www.viescas.com/Info/books.htm#Database Design

--
Duane Hookom
MS Access MVP
--

Kathy said:
Can you recommend a good resource for learning this? All
my books seem to avoid sql part of Access.

This is much simpler, Thank You!

-----Original Message-----
I'm not sure why you need more than one query:
Select Sum(Abs([Closed]-[Start]<.125 AND [Contact] ="Phone")) as
Closed3HrPhone,
Sum(Abs([Closed]-[Start]<3 AND [Contact]="Email")) as Closed3DayEMail
FROM tblYourTable
WHERE [Closed] is not Null;

--
Duane Hookom
MS Access MVP
--

How can you get the results of separate queries in the
same report? The wizard could not combine them.

I had to create successive queries to get the end result I
was looking for, then used the last query for each
report. I have 2 separate reports with a single field on
each, that I'd like to combine into one report.

If it helps to know specifically, this is what it does:

Using a date prompt: (to run daily, weekly and monthly)
test for the following

'status of activity' = 'closed',
'type of contact' = 'phone' or 'email'
Difference in start time and closed time in hours
If type of contact is phone, count of those with closed
time less than 3 hours? (this number currently feeds one
report)
If type of contact is email, count of those with closed
time less than 72 hours? (this number is used in second
report)

Any guidance is appreciated!


.
 
Back
Top