Expression in Access "Reports"

  • Thread starter Thread starter Reese
  • Start date Start date
R

Reese

I have a field in my table called [Sale Type]. There are 3 different choices
for this field: "Retail", "Wholesale" or "Warranty Only". I'm trying to
build an expression in my report that counts the number of records in that
field, but excludes "Warranty Only" entries. I'm using =count([Sale Type] =
"Retail","Wholesale"). I get an error saying "The expression you entered has
a function containing the wrong number of arguments". Access 2007.
 
Use one of the following

=Count(IIF([Sale Type] in ("Retail","Wholesale"),1,Null))

OR
=Count(IIF([Sale Type]="Warranty Only",Null,1))

OR
=Abs(Sum([Sale Type] <> "Warranty Only"))

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top