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  

COUNT



 
 
Thread Tools Display Modes
  #1  
Old July 26th, 2007, 02:56 AM posted to microsoft.public.access.reports
dasf890
external usenet poster
 
Posts: 2
Default COUNT

I have a report based off of a query. There is one column that is 'Account
Number'. The report lists every item and if there is more than one item, the
account number is listed as well. I'm trying to do a count on the number of
account numbers, but don't want duplicates counted on the report footer
field. Things that I have tried so far are DCount, Count, and IIf. I'm not
sure of the formula syntaxt that should work. Also, I'm almost thinking that
this cannot be done in the report, but needs to originate in the query and
brought over to the report. Any suggestions?
--
Dave
  #2  
Old July 26th, 2007, 06:09 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default COUNT

dasf890 wrote:

I have a report based off of a query. There is one column that is 'Account
Number'. The report lists every item and if there is more than one item, the
account number is listed as well. I'm trying to do a count on the number of
account numbers, but don't want duplicates counted on the report footer
field. Things that I have tried so far are DCount, Count, and IIf. I'm not
sure of the formula syntaxt that should work. Also, I'm almost thinking that
this cannot be done in the report, but needs to originate in the query and
brought over to the report.


Use Sorting an Grouping to group on the account number
field. Select Yes for the group header. Move the account
number text box to the group header.

Add another text box (named txtRunCnt) to the group header
section. Set its control source to =1 and its RunningSum
property to Over All.

Then a report footer text box can display the number of
accounts by using the expression =txtRunCnt

--
Marsh
MVP [MS Access]
 




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 05:05 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.