I was handed an old Access db someone else built awhile ago. I added one field to an existing query, but when I went to save it threw an error on a different field I never touched. Error message: Invalid Use of Vertical Bars. Here is the expression it didn't like, but somehow they were able to save it in the past:
DaysOpened:
IIf([re_close_date] Is Null|IIf([close_date] Is Null|Date()-[date_reported]|Date()-[reopen_dt]))
I've tried switching to commas and &'s, but can't get the right combination to rebuild this if someone can help? Basically...if re_close_date is null, check if close_date is null. If yes to both, record must still be Open so we need to calculate DaysOpened by taking current Date and subtracting date_reported or current Date - reopen_dt if record was reopened. Thanks.