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 / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

Help with count in formula

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DebRollins@meagape.com - 21 Jan 2008 17:13 GMT
I am trying to count unique records in a formula.  For example:
Vendor, Activity Type, Activity Date.  I have multiple Activity Types,
but I only want to count the Vendor once. DCount counts the vendor
everytime it occurs.

Vendor 1
Activity C

Vendor 1
Activity D

Vendor 1
Activity E

For the above I want to query for all Activity C and Activity D, but I
only want to count Vendor 1 one time.  How do I do this?  Dcount gives
me Vendor 1 twice.

Thank you,
Deb
Pat Hartman - 21 Jan 2008 19:19 GMT
DCount() is a domain function and operates over the entire domain so it has
no way to know that you want to summarize away the details of the
table/query you are using as the source.  Create a query that selects Vendor
from the table in question and does a Group by on it (use the sigma button
to make a totals query).  Then reference the new query in your DCount()
rather than the original table.

>I am trying to count unique records in a formula.  For example:
> Vendor, Activity Type, Activity Date.  I have multiple Activity Types,
[quoted text clipped - 16 lines]
> Thank you,
> Deb
 
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



©2009 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.