How to Give more than one Not Equals to Operator in a Report?

JithuAccess

Member
Local time
, 18:57
Joined
Mar 3, 2020
Messages
325
Hello Guys,

I want to find the Sum of the Payment if the Program is Not Equals to "M" Or "H" and I have given this Code

Code:
=Nz(DSum("[curTotal Paid]","[tblPayments Final]","strProgram<>'M' Or 'H'),0)

But I am getting an Incorrect Result.

I think the Logic is wrong.

Could you guys please help me how to fix this?

Thanks
 
Code:
=Nz(DSum("[curTotal Paid]","[tblPayments Final]","strProgram<>'M' Or strProgram <> 'H'),0)

The problem is that the ENGLISH word OR doesn't have the same exact meaning as the COMPUTER operator-symbol OR.

In English, OR is a conjunction. In Computerese, OR is an action verb.
 
Code:
=Nz(DSum("[curTotal Paid]","[tblPayments Final]","strProgram<>'M' Or strProgram <> 'H'),0)

The problem is that the ENGLISH word OR doesn't have the same exact meaning as the COMPUTER operator-symbol OR.

In English, OR is a conjunction. In Computerese, OR is an action verb.
Thanks a lot. I fixed it. I used "Is Null" and it worked Perfect. In my Programs Fields there are 3 Values "M", "H" and Blank (Null) I want to find the total of Blank (Null) and I use this code:
Code:
=Nz(DSum("[curTotal Paid]","[tblPayments Final]","strProgram Is Null),0)


Thank You
 
Code:
=Nz(DSum("[curTotal Paid]","[tblPayments Final]","strProgram<>'M' Or strProgram <> 'H'),0)

The problem is that the ENGLISH word OR doesn't have the same exact meaning as the COMPUTER operator-symbol OR.

In English, OR is a conjunction. In Computerese, OR is an action verb.
Pardon me for jumping in, but just to clarify for future readers, using OR would sum all the records because M<>H and vice versa.

In this case, I think we would want to use the AND operator.
 
Missing " from end of criteria, so how did that work?
 

Users who are viewing this thread

Back
Top Bottom