Link to home
Start Free TrialLog in
Avatar of pdvsa
pdvsaFlag for United States of America

asked on

Grouping and Report

Experts, I would like to modify the below to include an "OR" on the "Awaiting Amend Approval by Bank".  Can I include something like this:
this is wrong though:
MyGroup: IIf(IsNull([tblLCAmendHistory].[DateAmendApprovedByBank]) OR [tblLCAmendHistory].[WaitingBeneConsent])  ]),"Awaiting Amend Approval by Bank","Recently Approved Amend by Bank")

this is the original (no or stmnt):
MyGroup: IIf(IsNull([tblLCAmendHistory].[DateAmendApprovedByBank]),"Awaiting Amend Approval by Bank","Recently Approved Amend by Bank")

thank you
Avatar of pdvsa
pdvsa
Flag of United States of America image

ASKER

oops the [WaitingBeneConsent] would need to have  a condition of true or Yes for the "Awaiting Amend Approval by Bank" part.
Avatar of Jeffrey Coachman
The basic syntax is:

IIF((Something=X) Or (Something=Y),WhatToDoIfEitherIsTrue,WhatToDoIfNietherIsTrue)

Sample Query is attached
Access-EE.mdb
Avatar of pdvsa

ASKER

Boag2000:  I have an error here and wonder if you see it.  I added the second IIF and the IsNOTnull.  It says I have too many arguments.  
thank you.

MyGroup: IIf(IsNull([tblLCAmendHistory].[DateAmendApprovedByBank]) Or IIF(IsNotNull([tblLCAmendHistory].[WaitingBeneConsentYN]),"Awaiting Amend Approval by Bank","Recently Approved Amend by Bank")
IIf(IsNull([tblLCAmendHistory].[DateAmendApprovedByBank]) Or IIF(IsNotNull([tblLCAmendHistory].[WaitingBeneConsentYN]),"Awaiting Amend Approval by Bank","Recently Approved Amend by Bank")

Did you examine the sample I posted?

As far as I can tell (and based on the working syntax and sample I posted0, you don't need the second IIF

IIf(IsNull([tblLCAmendHistory].[DateAmendApprovedByBank]) Or (IsNotNull([tblLCAmendHistory].[WaitingBeneConsentYN]),"Awaiting Amend Approval by Bank","Recently Approved Amend by Bank")
Avatar of pdvsa

ASKER

Ok Thank you sir...will test this.  Have been out of pocket and willbe nxt few days.. Catch up soon...
Wait, ...what is "IsNotNull"?

I think you might need this:

IIf(IsNull([tblLCAmendHistory].[DateAmendApprovedByBank]) Or (Not IsNull([tblLCAmendHistory].[WaitingBeneConsentYN]),"Awaiting Amend Approval by Bank","Recently Approved Amend by Bank")
Avatar of pdvsa

ASKER

I see ... Thanks for catching that.  I have not been at computer...on vacation  At moment
Avatar of pdvsa

ASKER

Boag:  sorry for late response...getting caught up

It says I have a missing parenthesis or bracket: (i did put a parenthesis at very end but then said had wrong # arg's)
MyGroup: IIf(IsNull([tblLCAmendHistory].[DateAmendApprovedByBank]) Or (Not IsNull([tblLCAmendHistory].[WaitingBeneConsentYN]),"Awaiting Amend Approval by Bank","Recently Approved Amend by Bank")
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

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 pdvsa

ASKER

thank you for the help...enjoy the vacation!