I have typed this IIF in a few different ways and none of which seem to trip. An if statement detects it though.
rs!TimeCreated = "" in this example
CrTimeLookup is a string
Code:
CrTimeLookup = IIf(Not (rs!TimeCreated = "") Or Not (IsNull(rs!TimeCreated)), rs!TimeCreated, "N/A")
'CrTimeLookup stays a blank string or gets set to rs!TimeCreated. I can't tell which it is doing.
CrTimeLookup = IIf(Not rs!TimeCreated = "" Or Not IsNull(rs!TimeCreated), rs!TimeCreated, "N/A")
'same result
CrTimeLookup = IIf((Not rs!TimeCreated = "") Or (Not IsNull(rs!TimeCreated)), rs!TimeCreated, "N/A")
'same result
Am I doing something wrong? I read that you can use an IIF anywhere you can use an expression.