Count unique records

P

PizzaBoy

Does anybody know how to count the number of unique records by another field
in a report?
Sample Data:
BLD 1 UNIT 101
BLD 1 UNIT 101
BLD 1 UNIT 202
BLD 1 UNIT 202
BLD 1 UNIT 202
BLD 2 UNIT 303
BLD 2 UNIT 303
BLD 2 UNIT 303
Would like the following output:
BLD1 2
BLD2 1

The count would show the number of unique records per building. I currently
have a report which groups buildings and their associated average rate. I
would like the report to show the number of unique units within each
building.

Thanks in advance.

Unit 1 count=
 
J

Jeff Boyce

Have you considered doing the "count" work in a query, before you ever get
to a report?
 
P

PizzaBoy

Thanks for the suggestions. The report is currently built on a query-how
could I incorporate the count to accomplish this?

Thanks
 
J

Jeff Boyce

A report, like a form, can hold more than one query's results (main form,
sub form; main report, sub report), or can use an unbound control that uses
one of the database functions (DCount()) as a source.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top