T
TonyB
I'm using a Dcount call in one of my vba modules which is behaving
strangely.
I have a table tblSupport with a field [CallDate]. These dates range over
the last few months. On some dates there is more than 1 record, and dcount
is supposed to return the number of records for that date. [CallDate] is set
to a default value of Date() when a new record is created, and so should
reflect the date when the record was created.
I'm calling DCount with following syntax (note using UK date formats for
region settings)
dcount("[Date of Call]","tblSupport","[CallDate]=#10/03/2005#")
I can type this in the immediate window using different values for the date,
and for some records it is correct, returning 1,2,3 etc, but for other
records that have a matching date in [CallDate] dcount returns 0 ? So
19/02/2005 works correctly, but 10/02/2005 doesn't. But there are records
with both dates in the table.
Does anyone have any ideas what is happening here ?
Thanks
Tony
strangely.
I have a table tblSupport with a field [CallDate]. These dates range over
the last few months. On some dates there is more than 1 record, and dcount
is supposed to return the number of records for that date. [CallDate] is set
to a default value of Date() when a new record is created, and so should
reflect the date when the record was created.
I'm calling DCount with following syntax (note using UK date formats for
region settings)
dcount("[Date of Call]","tblSupport","[CallDate]=#10/03/2005#")
I can type this in the immediate window using different values for the date,
and for some records it is correct, returning 1,2,3 etc, but for other
records that have a matching date in [CallDate] dcount returns 0 ? So
19/02/2005 works correctly, but 10/02/2005 doesn't. But there are records
with both dates in the table.
Does anyone have any ideas what is happening here ?
Thanks
Tony