Simple way to assign a "select count" result

N

Nuno Guerra

Hi!

How can I display a "Select count(column_name) from 'Table A' " to an
variable in my form?

Any help?
thanks.
 
A

Alex Dybenko

Hi,
you can add a textbox to your form, and in controlsource write:
=DCount("column_name","TableA")
 
N

Nuno Guerra

Thanks.

I have one more question: I would like also to have a distinct count to
eliminate equal values. How can I do that?
 
D

Douglas J Steele

Create a query that does a SELECT DISTINCT on that field, then use the query
in the DCount statement, rather than the table.
 
Top