I'm having a challenge with the following string:
Datedeath: IIf([Members.Status]=[“DA”] Or [“DB”] Or [“DJ”] Or [“DC”], else [members.deathdate] "29/02/1844"
Might someone be able to guide me as to how to write this iif statement please?
I'm having a challenge with the following string:
Datedeath: IIf([Members.Status]=[“DA”] Or [“DB”] Or [“DJ”] Or [“DC”], else [members.deathdate] "29/02/1844"
Might someone be able to guide me as to how to write this iif statement please?
Check if the condition fulfilled, set new date or leave it
[members.deathdate]:IIf ((([Members.Status] = "DA" Or [Members.Status] = "DB" Or [Members.Status] = "DJ" Or [Members.Status] = "DC") And ([members.deathdate] = "" Or IsNull([members.deathdate]))), "29/02/1844", [members.deathdate])
IS NULL instead of =""? 2) Why do you have square brackets around the string literals -- ["DC"] instead of "DC"? 3) The parentheses around the blank check is unnecessary. 4) How did you get smart quotes in your expression?DeathDate is a Date/Time then there is no need to check for an empty string, just for nullity. Also, the expression I had in mind is AND Members.DeathDate IS NULL, which is more efficient as it uses an SQL expression instead of the VBA-exposed IsNull function.