Count Unique Records in a Query Column

hkluther

New member
Local time
Tomorrow, 01:49
Joined
Oct 7, 2004
Messages
3
Hi Everyone!
I have a hopefully simple question. Here goes.....
I want to count the number of unique records in a query column as below:

Weeknum
12
14
17
22
26
30
12
15
17
26

In the sample above the unique number of "weeknum" records should be 7
How do I generate this resulting value to a textbox in a report.
I know that there is a function in MS Excel called "FREQUENCY" which can be used to count the number of unique entries in a column. Is there a similar thing in Access? I've tried looking around but couldn't come up with anything.
Any suggestion will be appreciated. Thanks in advance.

Luther
 
Last edited:
I coudnot think of a clever way to do this but as nobody else has replied,

a Groupby on weeknum would return 7 records but as I don't know how to pick that up I would add another field to the query say flda:1 aggregate function First thus each record returned by the query would have the weeknum and a 1, then anotherquery could sum flda and this could be used in a report. As I said it's not clever.

Brian
 
Hi Brian !

Thanks for the tip. Your advise did work. I just needed to do a few adjustments. Thanks a million.

Luther
 

Users who are viewing this thread

Back
Top Bottom