Using COUNT on a form

  • Thread starter Thread starter D Kucey
  • Start date Start date
D

D Kucey

I am counting a field on a report but I want to be able
to count unique fields not the total. So if I have two
fields with the same value it would be counted as 1.

I have =count([LFID]) which counts the field twice if I
have 2 that are the same on my report.

Thanks
 
Hi,

My name is Dennis Schmidt. Thank you for using the Microsoft Newsgroups.

One approach would be to create a separate query that used Totals and
grouped by that field. The query would return one row for each unique
value. You could then retrieve that value using either code or a DCount()
statement. If the query needed parameters, you could retrieve them from
the report itself.

I hope this helps! If you have additional questions on this topic, please
reply to this posting.

Need quick answers to questions like these? The Microsoft Knowledge Base
provides a wealth of information that you can use to troubleshoot a problem
or answer a question! It's located at
http://support.microsoft.com/support/c.asp?M=F>.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.

Regards,
Dennis Schmidt
Microsoft Support
 
Back
Top