Count Expression

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

From http://support.microsoft.com/kb/q149127/

Count(DLookup("HoliDate", "Holidays", "HoliDate=#" & TheDate & "#"))

I wonder how come the above expression is true if HoliDate is 5/1/2005 or
1/5/2005 is compared with the [TheDate] which have either one of the value.

For Example,

I entered 1/5/2005 as a holiday in the holiday database. But when I compare
with my main record which is 5/1/2005, The expression is true and a count is
added.

May I know what actually happened?
 
I am still debug the reports today by adding watches on Dlookup and TheDate

The thing I observed is that

when Dlookup value is 1/5/2005 and TheDate value is 5/1/2005 => it said the
function is true. I don't understand why. Hope someone can guide me. Thanks.
 
Back
Top