dhWorkdaysA Function

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

Guest

Hi,

I've used Allen Browne's dhWorkdaysA function code in a database to
calculate the number of working days between two dates. The code works fine
which is great, however when I try to average the value in a seperate query I
get the error message 'Data type mismatch in expression criteria'. Does
anyone have any ideas why this is?

Any help would be great.

Phil
 
As a guess, the average function is not recognizing the value returned in the
query as a number. Try forcing it by wrapping the returned value in a CLng
function or by using the Val Function around the number.
 
Back
Top