Link to home
Start Free TrialLog in
Avatar of clover10
clover10

asked on

MS Access "IF" and "Or" Query

I am trying to add an "or" to a query, this is what I currently have:

Sum(IIf(([DExtract].[ValTT]<>"Payments") OR ([DExtract].[ValTT] <> "Invoices"),[DExtract].[AmountTBCAPB],0,0)) AS [TEST]

Open in new window


also tried:

Sum(IIf(([DExtract].[ValTT]<>"Payments") AND ([DExtract].[ValTT] <> "Invoices"),[DExtract].[AmountTBCAPB],0,0)) AS [TEST]

Open in new window

Avatar of mbizup
mbizup
Flag of Kazakhstan image

What results are you hoping for?
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of clover10
clover10

ASKER

I realized I needed to do "AND" and not "OR" but thank you that worked!!!
Great! Thanks!