Count

  • Thread starter Thread starter Bruce
  • Start date Start date
B

Bruce

I have a database that has filds such as Business Full & Business Aspect
each has three classes small,medium & large. I need to count how many hits
there are i.e. Business Full/Large, Business Full/Medium etc. How can I
achieve this?

Bruce
 
Hi Bruce,

Use the Domain Aggregate function DCount, example:

=DCount("[Business Full]","[name of your table]", "[Business Full] =
small")
=DCount("[Business Full]","[name of your table]", "[Business Full] =
medium")
=DCount("[Business Full]","[name of your table]", "[Business Full] =
large")

=DCount("[Business Aspect]","[name of your table]", "[Business Aspect] =
small")
=DCount("[Business Aspect]","[name of your table]", "[Business Aspect] =
medium")
=DCount("[Business Aspect]","[name of your table]", "[Business Aspect] =
large")

You can have the above as the Control Sources for textbox controls on your
Form/Report.

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights



--------------------
| From: "Bruce" <[email protected]>
| Newsgroups: microsoft.public.access.reports
| Subject: Count
| Lines: 8
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <[email protected]>
| Date: Mon, 8 Mar 2004 22:54:48 -0000
| NNTP-Posting-Host: 82.42.112.111
| X-Complaints-To: (e-mail address removed)
| X-Trace: news-binary.blueyonder.co.uk 1078786276 82.42.112.111 (Mon, 08
Mar 2004 22:51:16 GMT)
| NNTP-Posting-Date: Mon, 08 Mar 2004 22:51:16 GMT
| Organization: blueyonder (post doesn't reflect views of blueyonder)
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!newsfeed.wirehub.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewso
utpeer01.lnd.ops.eu.uu.net!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!mephi
stopheles.news.clara.net!news.clara.net!news-hub.cableinet.net!blueyonder!ne
ws-fe1!news-binary.blueyonder.co.uk!53ab2750!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.reports:132878
| X-Tomcat-NG: microsoft.public.access.reports
|
| I have a database that has filds such as Business Full & Business Aspect
| each has three classes small,medium & large. I need to count how many hits
| there are i.e. Business Full/Large, Business Full/Medium etc. How can I
| achieve this?
|
| Bruce
|
|
|
 
It would help to have a sample of data with table and field names. I can't
tell if you have a field [Business] with values "Full" or "Aspect" and a
field [Class] with values "Small", "Medium", and "Large" or some other
structure.

I would not use domain aggregate functions to create your totals in a report
since each function call creates a very in-efficient separate recordset. If
your structure has the two fields [Business] and [Class], to get counts, you
can use:
Count for Full and Small:
=Sum( Abs([Business]="Full" and [Class]="Small"))
 
Back
Top