Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 11th, 2006, 08:28 AM
Authorized User
Join Date: Jul 2006
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default Count Distinct

Hey all,

I have a query pulling up many different claims and corresponding payments. My question is how to get a count of each different claim ID, not total number of claim ID's. For example:
Claim 1 $500
Claim 2 $600
Claim 1 $700

I want this count to be 2, not 3. 2 different claims (Claim 1 and Claim 2) not total claims. Thanks!

Reply With Quote
  #2 (permalink)  
Old August 11th, 2006, 10:57 AM
Friend of Wrox
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts

Hi Jonas,

Use the access query builder, and specify that table. Then drop the Claim ID field down twice, click the grouping button on the top, and then ensure that the group by for the first is Group By, and the Second one is Count.

Hope that helps,


Reply With Quote
  #3 (permalink)  
Old August 14th, 2006, 01:03 PM
Authorized User
Join Date: Jul 2006
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts

hi Mike,

Thanks for the reply, but that just gives me the total number of claims. what i need is the number of different claims names (IE claim-1, claim-2etc) even if theirs 100 different claims with the name "mike" it should only count it once.


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
count distinct values Chris Cash XSLT 3 June 8th, 2006 04:55 PM
count distinct nodes alexshiell XSLT 2 January 27th, 2005 11:19 AM
sql to return distinct count pbgurl Access VBA 2 October 29th, 2004 06:29 AM
COUNT ON SELECT DISTINCT stmt savoym SQL Language 7 August 28th, 2003 07:58 AM

All times are GMT -4. The time now is 01:18 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.