Count records based off IIF query

olsen9

New Member
Joined
Sep 23, 2011
Messages
2
So my query so far is:
Sum(IIf([tblrawdata]![DC_NO1] Is Null And [tblrawdata]![DC_NO2] Is Null And [tblrawdata]![DC_NO3] Is Null And [tblrawdata]![DC_NO4] Is Null,1,0))

Which show's me the result I am looking for which is to set the count as 1 if the records are null.

My next part of this query, I am having problems with. I need to add an Else statement that if this result is 0 then add up the count of records between the 4 fields above (tblrawdata]![DC_NO1), 2, 3 & 4.

I'm writing this as an expression in Access so I would like to keep what I have so far and add to my expression builder.

Any help I would greatly appreciate.
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Watch MrExcel Video

Forum statistics

Threads
1,102,288
Messages
5,485,909
Members
407,523
Latest member
Talicius

This Week's Hot Topics

Top