Expression in Access "Reports"

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.
 
J

John Spencer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top