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  

Show Maximum Number in Report Footer



 
 
Thread Tools Display Modes
  #1  
Old August 12th, 2009, 08:54 PM posted to microsoft.public.access.reports
Basenji
external usenet poster
 
Posts: 61
Default Show Maximum Number in Report Footer

In a report footer in Access 2003 I want to show the maximum number from the
group footers in the report. The last name group header has the name of the
client. In the detail section of the report there are a date of contact
[date] and type of contact [type] fields. The last name group footer has an
unbound control with the count of the contacts with the customer,
=Count([Date]), so I can quickly see the total number of contacts with each
customer. Now in the report footer in an unbound countrol I want to show the
largest number of contacts and also the name of the customer. The max
expression does not work, at least it did not for me. What do you suggest?
Thank you for your assistance.
  #2  
Old August 12th, 2009, 09:34 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Show Maximum Number in Report Footer

You need to create a new query that returns this information. You can then
use either a subreport or add the new query to your reports record source.

For instance, if I wanted to display only the customer with the most orders
in the Orders table in Northwind, my SQL would be:

SELECT TOP 1 CustomerID, Count(OrderID) AS NumOfOrders
FROM Orders
GROUP BY CustomerID
ORDER BY Count(OrderID) DESC;


--
Duane Hookom
Microsoft Access MVP


"Basenji" wrote:

In a report footer in Access 2003 I want to show the maximum number from the
group footers in the report. The last name group header has the name of the
client. In the detail section of the report there are a date of contact
[date] and type of contact [type] fields. The last name group footer has an
unbound control with the count of the contacts with the customer,
=Count([Date]), so I can quickly see the total number of contacts with each
customer. Now in the report footer in an unbound countrol I want to show the
largest number of contacts and also the name of the customer. The max
expression does not work, at least it did not for me. What do you suggest?
Thank you for your assistance.

 




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 01:07 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.