A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count unique using calculated control



 
 
Thread Tools Display Modes
  #1  
Old October 27th, 2006, 09:59 AM posted to microsoft.public.access.forms
Zilla
external usenet poster
 
Posts: 14
Default Count unique using calculated control

Hi,

I have a form the point of which is to show aggregated data, based on a
query. I need a calculated control on this form to cuont the unique values in
one particular field. this is proving rather more comlpicated than one would
expect.

The standard response to this problem is not to use a calculated control at
all, but to create a seperate totals query and then add that to the form
source query. I cannot seem to get this to work as the totals query itself
displays the count correctly but when added to the larger query the totals
get mangled.

Can anyone can help me either in finding a control source formula (ideally),
or a way of integrating a totals query effectively?

Thanks in advance
  #2  
Old October 27th, 2006, 11:04 AM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Count unique using calculated control

The DCount() function in Access does not handle counting distinct values,
but there's a replacement here that does:
http://allenbrowne.com/ser-66.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Zilla" wrote in message
...
Hi,

I have a form the point of which is to show aggregated data, based on a
query. I need a calculated control on this form to cuont the unique values
in
one particular field. this is proving rather more comlpicated than one
would
expect.

The standard response to this problem is not to use a calculated control
at
all, but to create a seperate totals query and then add that to the form
source query. I cannot seem to get this to work as the totals query itself
displays the count correctly but when added to the larger query the totals
get mangled.

Can anyone can help me either in finding a control source formula
(ideally),
or a way of integrating a totals query effectively?

Thanks in advance



 




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.