Odd, your original query was looking for the number of hours between Now()
and A_DATE_END to be greater than 0, and so A_DATE_END would be after Now().
Take the following examples:
Now() = 12 Feb 2009 14:00
A_DATE_END = 12 Feb 2009 13:45
In your original query, DateDiff("h",Now(),A_DATE_END) would return -1 and
the statement would be False.
In your replacement, the statement would equate to True because you are
adding 1 hour to A_DATE_END and that will be after the value of Now(). The
replacement I suggested would be False too, and so match your original.
Now, take the example:
Now() = 12 Feb 2009 14:00
A_DATE_END = 12 Feb 2009 14:45
In the original version this would be False still, because DateDiff will
return 0. In my version it's False too, and again in yours it's True.
I think you need to check your results, as I can't see how your change could
be giving you the same results as you had in your original Access query.
Dan
M. wrote on Thu, 12 Feb 2009 07:32:01 +0200:
it did not give the correct result as you sent me but when I changed it
to following it worked: