IIf (1 Viewer)

mike60smart

Registered User.
Local time
Today, 13:23
Joined
Aug 6, 2017
Messages
1,904
Hi Everyone

Can anyone see where I am wrong with this IIf statement?

Code:
=IIf([TotalC]=0 And [ContractSumtoDate]=0,[RunningTotal]=[OriginalContractSum],IIf([TotalC]=0,[ContractSumToDate],(Nz([ContractSumToDate],0)-Nz([txtT],0))))

Any help appreciated
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:23
Joined
Oct 29, 2018
Messages
21,455
Hi Mike. Are you wanting to get a True/False result?
 

isladogs

MVP / VIP
Local time
Today, 13:23
Joined
Jan 14, 2017
Messages
18,211
Assuming you are calculating the RunningTotal, then

Code:
RunningTotal=IIf([TotalC]=0 And [ContractSumtoDate]=0,
[OriginalContractSum],IIf([TotalC]=0,
[ContractSumToDate],Nz([ContractSumToDate],0)-Nz([txtT],0)))
 

isladogs

MVP / VIP
Local time
Today, 13:23
Joined
Jan 14, 2017
Messages
18,211
You're welcome. An 'inspired' guess on my part.
 

Users who are viewing this thread

Top Bottom