Sorry, but it's easiest for me to explain this using sql and what you're asking about is very easy sql, so...
A count counts the records in a table, so even if you count based on the field it doesn't really matter.
For example:
select count(*)
from table
or
select count(field1)
from table
should yield the same results - Also it's easy enough to create a test table and put in some sample data, so don't trust me just test it yourself. Note: nulls may not play as friendly, but I can't remember off the top of my head.
To limit your count by field I usually do something like this:
select count(*)
from table
where field = whatever your criteria
So, from the design view just put in your criteria.
Note: it is also possible you could so something with an iif or dcount, but both are particular to access and I prefer to stick with ANSI sql as much as possible since that should work regardless of platform.
Also, the criteria portion is where speed could become an issue..., but unless you're talking 100,000 of thousands of records you probably don't need to worry about it until it happens.
For beginning sql, check out
www.w3schools.com
Edited by: Ender on Fri Jun 27 19:09:03 EDT 2008.