Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nested IFs

Status
Not open for further replies.

mlocurci

MIS
Oct 17, 2001
210
0
0
US
I need to nest IFs and I don't know how to do that. I need to check one field for a value and look at another field for a value. If field 1=x and field 2=y, I want to count that.

Ideas?

Thanks!
 
Try this in the field of your query:
IIf([x]=1,IIf([y]=1,([x]),0))
and set the totals field to count
 
Use the above statement as the control source of a text box in your report
 
Okay. Try this in a text box in your report.

=Count(IIf([Field1]=x,IIf([Field2]=y,([Field1]),0)))

where field 1 and field 2 are the names of your fields, and x and y are the criteria.

Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top