Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A "Count Unique" Total

Status
Not open for further replies.

Milin

Technical User
Jan 5, 2000
33
US
I have a report in which I am grouping data together by unique address. I want to create a total in the footer of the report that counts the number of unique addresses from the address field - so I can see how many address groups I have in the report.&nbsp;&nbsp;All I see in Access is the COUNT function but not a COUNT UNIQUE function. I know I can do this in Crystal Reports, but I want to do this report within Access<br><br>Thanks!<br>Milin
 
There was a post a ways back that that showed how to do it.<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Try this:<br><br>Create a function in the report called uniquecount<br><br>Function Uniquecount()<br>Uniquecount=groupcounter/2<br>End Function<br><br>Declare a public Variable in General Declarations<br>Public groupcounter As Integer<br><br>Finally for the GroupHeader Format event set it to <br>groupcounter=groupcounter+1<br><br>Add a text box to the report footer with this control source:&nbsp;&nbsp;=uniquecount()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top