Iif Statement returning incorrect value in subform

rhonda6373

Registered User.
Local time
Today, 02:24
Joined
Jun 14, 2015
Messages
22
I am trying to sum a column on a subform named Cost of New if another column named Final = any of the values listed in my code. However, it is summing the Cost of New column regardless of the values of Final. It is summing for all values.

What do I need to modify to make this correct or should I do it another way?


  1. =IIf([Final]="RPR-RPR & RTN" Or [Final]="NFF-TST & NFF" Or [Final]="RTN-RETURN" Or [Final]="SCL-SCR LOCALLY" Or [Final]="SCR-SCR RETURN" Or [Final]="BER-BER RTN CST",Sum([Cost Of New]),Null)
Thanks in advance!
 
Looks like I've seen these "RPR" values before. Was your question in your other thread not answered?

Code:
=SUM(IIF([Final] IN ('RPR-RPR & RTN', 'NFF-TST & NFF', 'RTN-RETURN', 'SCL-SCR LOCALLY', 'SCR-SCR RETURN', 'BER-BER RTN CST'), [Cost Of New], Null))
 
Yes, it was. This is a different question. Thanks, this worked!
 

Users who are viewing this thread

Back
Top Bottom