I have the field shown below in a query which is now working properly and correctly putting either Overdue or Not Overdue in a new field. I am then searching on this field to obtain any overdue records. This is all fine.
Reviewdate1: IIf(DateAdd("d",(([courseplannedenddate]-[coursestartdate])/5),[coursestartdate])<=Date(),"overdue","notoverdue")
But, if either the courseplannedenddate or the coursestartdate are empty then the whole query fails (data mismatch). How can I trap the error in Access. If this was a problem in Excel I would use iserror but I have no idea of the syntax to use in Access.
Can you do a nested if in Access?
How can I trap the error?
Or is there a better way of approaching this? Am I thinking too much Excel and not enough Access?
Any assistance greatly appreciated
Marion
Reviewdate1: IIf(DateAdd("d",(([courseplannedenddate]-[coursestartdate])/5),[coursestartdate])<=Date(),"overdue","notoverdue")
But, if either the courseplannedenddate or the coursestartdate are empty then the whole query fails (data mismatch). How can I trap the error in Access. If this was a problem in Excel I would use iserror but I have no idea of the syntax to use in Access.
Can you do a nested if in Access?
How can I trap the error?
Or is there a better way of approaching this? Am I thinking too much Excel and not enough Access?
Any assistance greatly appreciated
Marion