Calc no of working days in current month

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
 
W

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
 
M

Michel Walsh

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
 

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