Appreciate help understanding the following IIf statement:
ExclusionSW: IIf(([CallType] Like "Insurance*") And ([CallType2] Is Null),1,IIf(([CallType] Like "ChgOrder*") And ([ProductLine] Is Null),1,0))
Thank you
Appreciate help understanding the following IIf statement:
ExclusionSW: IIf(([CallType] Like "Insurance*") And ([CallType2] Is Null),1,IIf(([CallType] Like "ChgOrder*") And ([ProductLine] Is Null),1,0))
Thank you
I don't see how this can work but:
if [Caltype] has word "insurance" in it AND [Caltype2] is null
then show 1
else
if Caltype has word "ChgOrder" in it AND ProductLine is null,
then show 1
else
show 0
Thanks for the response. Perhaps I should have shared the following information.
The statement posted is in one of the Query fields and 0 is in the Criteria. Does this help?
Just a minor change to ranman's response.
if [Caltype] starts with "insurance" in it AND [Caltype2] is null
then show 1
else
if Caltype starts with "ChgOrder" in it AND ProductLine is null,
then show 1
else
show 0
Could modify with OR:
ExclusionSW: IIf(([CallType] Like "Insurance*" And [CallType2] Is Null) OR ([CallType] Like "ChgOrder*" And [ProductLine] Is Null), 1, 0)
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba