Working Days function

A

AndyC

Hi,

I am working on calculating a date a number of working days after a given
date taking account of holidays. I am calling a function suggested on a
number of posts found at the link:

http://www.mvps.org/access/datetime/date0012.htm

This link works fine if passing just the number of working days to be added
with the original date, but if I include an array of holidays I get an error
'Data mismatch in criteria expression'

I have also tried calling the function using the example given in the actual
code itself (please excuse the use of pound signs rather than hashes in this
example but the keyboard I am using to type this message is playing up. I am
using hashes in the actual code!!) - dhAddWorkDaysA(10, £2/9/2000£,
Array(£2/16/2000£, £2/17/2000£)) - and that gives me the same error message!
Again, if I don't include the array of holidays it works perfectly.

I am in the UK so use date format DMYY rather than MDYY but have tried all
combinations with the same end result. Any help would be greatly appreciated
with this as I am spending silly amounts of time on it and getting absolutely
nowhere!

Cheers,

Andy
 
D

Douglas J. Steele

Hmm. That code has worked fine for hundreds of others, so I'm really
puzzled.

Have you tried single-stepping through the code to see the exact line of
code that's failing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top