>
>max() and min() are always problematic in SQL - SELECT statements, because they have another meaning: the maximum value for a single field, within a set of grouped records.
>
>Replace it with an iif(), for example:
>
>
>iif(date_fld1 - date_fld2 > 0, date_fld1 - date_fld2, 0)
>
>
>... or create a UDF:
>
>
>MyMax(date_fld1 - date_fld2, 0)
>
I decided to go with your UDF suggestion. It works.
Thank you very much.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham