Count Unique Records

G

Guest

Hi.

I have a report which is based on a query which is based on two tables
having a one-to-many relationship. A header in the report shows info from
the parent table and the corresponding child info is in the detail section.
So, for example, I might have a vendor in the header and all of its locations
in the detail section. My problem is that I would like to list in the Report
header how many vendors are included in the list. Everything I do keeps
returning the amount of all records in the query. For example, if i had three
vendors with five locations each, it returns 15. How can I return only the
number of vendors in this case??

Any help is greatly appreciated.

-Ryan
 
M

Marshall Barton

Ryan said:
I have a report which is based on a query which is based on two tables
having a one-to-many relationship. A header in the report shows info from
the parent table and the corresponding child info is in the detail section.
So, for example, I might have a vendor in the header and all of its locations
in the detail section. My problem is that I would like to list in the Report
header how many vendors are included in the list. Everything I do keeps
returning the amount of all records in the query. For example, if i had three
vendors with five locations each, it returns 15. How can I return only the
number of vendors in this case??


Add a text box named txtVenderCnt to the Vendor group header
section. Set its control source expression to =1 and
RunningSum to Over All. Then the report footer text box can
display the total number of vendors by using the expression
=txtVenderCnt
 

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