Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two Criteria in IIf Stmt

Status
Not open for further replies.

RLA

Instructor
Feb 22, 2002
22
US
Hi,
I am trying to do a report which joins a transaction history table and an accounting table. Because it's an accounting table, there are two txns for every one on the lending side if a txn is reversed (there's a debit and a credit) which is messing up my report. Is it possible to use two criteria in an IIf statement, and have it such that, if these criteria are met, the report doesn't print that line? Or do I have to include another query? I'm not sure how to do it. Here's what I tried to do:

=IIf([If_Rev]<>&quot;No&quot; And [GLHI_Src] <> &quot;dr&quot;, [Client_Name], Null))

Basically, the thought was, if the txn was reversed and there was a debit and credit, I would select one side (either the debit or credit) and say to Access, 'don't display this.' Can this be done (I might not be making much sense, sorry!)?

Thanks very very much.
 
If your IIF statement didn't work then try nesting them.

i.e. Iif(condition1,iif(condition2,Result,null),null)

Hope this helps. Regards
Warwick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top