G
Guest
Hi
I am 99% there in implementing the code on
www.mvps.org/access/datetime/date0012.htm but get a 'data type mismatch in
criteria expression' when I specify holiday dates. This is the query I have
built in the query design grid:
SLA_Wrkdays:
dhCountWorkdaysA([SELECTION]![AP_EXT_APPDATE_DDMMYY],[SELECTION]![AP_EXT_DECDATE_DDMMYY],Array(#26/12/2005#,#27/12/2005#,#02/01/2006#))
It works fine when I omit the 'Array(#26/12/2005#,...)' part, but, as a lot
of the data I have relates to the time period around the year-end, I need to
be able to exclude these dates. Any advice would be gratefully accepted. I
wondered if it had anythingto do with the "= Empty" part of "Public Function
dhCountWorkdaysA(ByVal dtmStart As Date, ByVal dtmEnd As Date, Optional
adtmDates As Variant = Empty) As Integer", but removing the "= Empty" didn't
help.
As an aside, I also set up the holiday dates in a table thinking I would
have the query reference the table, but in the end couldn't figure out how to
get that to work.
I am 99% there in implementing the code on
www.mvps.org/access/datetime/date0012.htm but get a 'data type mismatch in
criteria expression' when I specify holiday dates. This is the query I have
built in the query design grid:
SLA_Wrkdays:
dhCountWorkdaysA([SELECTION]![AP_EXT_APPDATE_DDMMYY],[SELECTION]![AP_EXT_DECDATE_DDMMYY],Array(#26/12/2005#,#27/12/2005#,#02/01/2006#))
It works fine when I omit the 'Array(#26/12/2005#,...)' part, but, as a lot
of the data I have relates to the time period around the year-end, I need to
be able to exclude these dates. Any advice would be gratefully accepted. I
wondered if it had anythingto do with the "= Empty" part of "Public Function
dhCountWorkdaysA(ByVal dtmStart As Date, ByVal dtmEnd As Date, Optional
adtmDates As Variant = Empty) As Integer", but removing the "= Empty" didn't
help.
As an aside, I also set up the holiday dates in a table thinking I would
have the query reference the table, but in the end couldn't figure out how to
get that to work.