Is there a way to add a footer to a Query?

K

Klatuu

Well, yes you can, but the report is the proper way to do it.
Although I wouldn't think I would ever find a case where this is a good
solution, what I did just because the question was so (PCSpeak Begin)
interesting and unusual (PCSpeak End), I had to try it.
A created two querys based on the same table. One detail and one totals.
Then I created a union query to pull them together:

SELECT "A" As Identifier, Activity, Jan, Feb, Mar, Apr, SumOfMay As May
FROM _xdetail;
UNION ALL SELECT "Z" As Identifier, "Totals" As Activity, SumOfJan,
SumOfFeb, SumOfMar, SumOfApr, SumOfSumOfMay As May FROM _xfoot
ORDER BY Identifier, Activity;

(Can the answer be more bizzare than the question)
 
J

John Spencer

I am guessing that your solution may be what the poster wants or it may not
be. If they want a page footer when they are printing a query then they
have no control over what is in the page footer.

If they want that ability, it is time to create a report based on the query.
 
K

Klatuu

John,
I don't think you read the entire post. I thought the question was so off
the wall and Allen Browne said it could not be done, AND I am bored, I
thought it would be fun to try it.
Also note in my post I pretty specifically said it was not a good idea.

Have another Prozac and enjoy the scenery
 
J

John Spencer

I apologize if my reply caused you to think that I disagreed with you. I
was trying to say I read the original posting differently than you did.
The poster wasn't clear about what s/he wanted and I thought your response
answered one of the two interpretations I saw. I was trying to emphasize
that there was another interpretation of the question and that your solution
(a viable one) only answered one interpretation.

Add a footer to a query
(1) Add a summary line or other line of information to the end of the
results
or
(2) When printing add information to a page footer ; such as adding the
words "Confidential Information" at the bottom of each printed page

By the way, I don't use Prozac - a good glass of wine is all I need to
unwind.
 
K

Klatuu

I prefer a good Oregon Merlot.

John Spencer said:
I apologize if my reply caused you to think that I disagreed with you. I
was trying to say I read the original posting differently than you did.
The poster wasn't clear about what s/he wanted and I thought your response
answered one of the two interpretations I saw. I was trying to emphasize
that there was another interpretation of the question and that your solution
(a viable one) only answered one interpretation.

Add a footer to a query
(1) Add a summary line or other line of information to the end of the
results
or
(2) When printing add information to a page footer ; such as adding the
words "Confidential Information" at the bottom of each printed page

By the way, I don't use Prozac - a good glass of wine is all I need to
unwind.
 
R

Rob Parker

<snip>... a good glass of wine is all I need to unwind.
<snip>

Completely off-topic, but hey, it's late Friday night and I'm doing it
already ...

I suggest that this would be better as " ... a glass of good wine ..."

Rob
 
Top