pcover,
Try this:
DaysOpen: IIf(Not
IsNull([YourTableName]![CloseDate]),DateDiff("d",[YourTableName]![CreationtDate],[YourTableName]![CloseDate]),0)
Substitue "YourTableName" with the actual name of your table, "CloseDate"
with the name your your field representing the Close Date and "CreationtDate"
with the name of your filed representing the Creation Date.
Watch out for line wrap here. This should be all one line.
-----
HTH
Mr. B
http://www.askdoctoraccess.com/
Doctor Access Downloads Page:
http://www.askdoctoraccess.com/DownloadPage.htm
"pcover" wrote:
> I am using the following formula to calulate the number days between creation
> date & closing date.
>
> DaysOpen: (DateDiff("d",CDate([...DATE_CREAT]),CDate([...DATE_CLS])))
>
> It works well as long as the both dates are complete. However, there are
> times when some items have not yet been closed so the field is blank. In
> this case it returns the following error "#Error" I need to get rid of this
> error message and replace it with 0.
>
> Any ideas??
> --
> pcover