Calc no of working days in current month

  • Thread starter Thread starter Walter
  • Start date Start date
W

Walter

Hi,

I would like to calculate the number of work days in a
month. The start date would be the 1st of the current
month and enddate of yesterday Now()-1. It should also
exclude public holidays which would be stored in a
holidays table with the fields 'Date' and 'HollDesc'.

Essentually I want this to work the same as the
networkdays function in excel, however i'm not sure how to
do this in access.

Regards,

Walter
 
Thanks Michel,

Got most of this working except for holidays. I have a
table of holidays dates of type date.

How do you declare a field from a table as an array?
i.e for variant adtmDates in the code you suggested.

Walter
 
Hi,



The GetRows method that belong to recordset (ADO or DAO) return the fields into an array
(transposed).

' VB6/VBA6
Dim x() as Variant
x=rst.GetRows( ) ' you do not use SET


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top