Discussion Locked

Calculating Networkdays in Access 2000

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

I have three text box controls, OpenDate, CloseDate, NumDays. The OpenDate,
CloseDate controls are data/time fields and the NumDays is a number field.
Is there a way to use Expression builder to calculate the working days using
the function NETWORKDAYS?

I tried using it in this fashion, Control Source: = NETWORKDAYS (OpenData,
CloseDate) but I get #Name? as a result (I do have the correct dll file
installed for this function, MSOWCF.DLL)

I got to work fine in Excel, but not Access. I did not try doing in VB
because I'm not sure how to start the function. Any help is very much
appreciate it

Thank you

5 replies

by donq

NumDays = [CloseDate] - [OpenDate]

Microsoft Access stores the Date/Time Vaiable as a Number.

There aree many methods available in addition to the above that can be found in on-line Help. (i.e., DiffDate)

by thallone

The Number of days is as the previous answer indicates, but that would be total days. What you then need to do is to take int(5/7 Numdays) + Numdays mod 7. This will give you the numver of days in whole weeks, and the number of days in the partial week. Now all you need is to figure for holidays(if this matters for you), and there you are.

This discussion is closed to new replies.