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 / Modules / DAO / VBA / November 2004

Tip: Looking for answers? Try searching our database.

Different values in a record set

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Matt - 30 Nov 2004 12:01 GMT
Is there an easy way to determine how many diiferent values appear in a query
or table. I am not interested in how many time a particular value appears
just in counting the number of different values that appear.

Thanks in advance

Matt
Nikos Yannacopoulos - 30 Nov 2004 14:13 GMT
Matt,

Assuming I want to count different customers (field: CustID) invoiced in
table tblInvoices, the SQL for the query would be:

SELECT Count(qry1.CustID) AS CountOfCustID

FROM (SELECT tblInvoices.CustID FROM tblInvoices GROUP BY
tblInvoices.CustID) AS qry1

Just use your table/query and field names instead.

HTH,

Nikos

> Is there an easy way to determine how many diiferent values appear in a query
> or table. I am not interested in how many time a particular value appears
[quoted text clipped - 3 lines]
>
> Matt
 
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.