HOW DO I USE COUNTIF FUNCTION ACCESS 2007 ?

  • Thread starter Thread starter Udaya
  • Start date Start date
You don't. COUNTIF is an Excel function. Access is not Excel.

In Access, you would need to construct a query which returns the records
meeting your desired criteria, and apply the COUNT function to a field in
the SELECT list.

n.b. posting in all capitals is considered to be SHOUTING and therefore
impolite.
 
SELECT Count(IIF(SomeField='something',1,Null)) as CountSomething
FROM YourTable

OR Use the DCount function
DCount("*","YourTable","SomeField = 'Something'")

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
Just a big Thank You! Anything can be done if you want it bad enough. I get tired of the "Access" can't do it.
 
Back
Top