Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / March 2008

Tip: Looking for answers? Try searching our database.

Counting specific records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PowellGirlTN - 06 Mar 2008 21:42 GMT
I have a report that lists employees and their job function.  At the bottom
of the report I want to list each job function and count how many people do
that function.  This is not working for me, any idea what I'm doing wrong.  
Thank you

=Count([JobFunctionID])="Typist"
Duane Hookom - 06 Mar 2008 21:53 GMT
Count() counts everything that isn't null. The expression
   ([JobFunctionID])="Typist"
will evaluate to either -1/True or 0/False. Count() will count all the -1
and 0 values.

You can use:
=Sum(Abs([JobFunctionID]="Typist"))
If you have multiple JobFunctions, then you might want to use a subreport
that has a Record Source that Groups By JobFunctionID and Counts
JobFunctionID.

Signature

Duane Hookom
Microsoft Access MVP

> I have a report that lists employees and their job function.  At the bottom
> of the report I want to list each job function and count how many people do
> that function.  This is not working for me, any idea what I'm doing wrong.  
> Thank you
>
> =Count([JobFunctionID])="Typist"
PowellGirlTN - 07 Mar 2008 00:19 GMT
Thanks so much for your explanation, may I ask though what does ABS indicate?
Thanks again.

> Count() counts everything that isn't null. The expression
>     ([JobFunctionID])="Typist"
[quoted text clipped - 13 lines]
> >
> > =Count([JobFunctionID])="Typist"
Duane Hookom - 07 Mar 2008 01:58 GMT
Abs() returns the absolute value of the expression.
  [JobFunctionID]="Typist" will evaluate to -1 or 0
  Abs([JobFunctionID]="Typist") changes -1 to +1
  Sum(Abs([JobFunctionID]="Typist")) sums the absolute value
Signature

Duane Hookom
Microsoft Access MVP

> Thanks so much for your explanation, may I ask though what does ABS indicate?
>  Thanks again.
[quoted text clipped - 16 lines]
> > >
> > > =Count([JobFunctionID])="Typist"
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.