# Database Discussions > Microsoft Access >  Microsoft Access - Calculating Due Date excluding holidays and weekends

## zahr03

We have a database form where we identify when a document that has been submitted is due.  Currently, the database form calculates the number of turnaround days based on the length of the document submitted.  I need to take it to the next step which is to have it add the number of turnaround days to the date received to arrive at the due date - but I need to exclude holidays and weekends.  It's taken all I could do to get this far, but haven't found anything that seems to help in this case.  I know nothing about VB.  Appreciate your suggestions.

----------


## HiTechCoach

> We have a database form where we identify when a document that has been submitted is due.  Currently, the database form calculates the number of turnaround days based on the length of the document submitted.  I need to take it to the next step which is to have it add the number of turnaround days to the date received to arrive at the due date - but I need to exclude holidays and weekends.  It's taken all I could do to get this far, but haven't found anything that seems to help in this case.  I know nothing about VB.  Appreciate your suggestions.


I would recommend this code:
 NetWorkdays and fAddWorkDays ...

It is really easy to use. 

1) create the table tblHolidays with  a field named HolidayDate that is data type date/time. This will hold a list dates to skips other than weekends.

2) copy and paste the code onto a new code module. Name the module *modWorkdays* 

Now you are ready to use the functions.

Similar to using the DateAdd() fucntion you will use fAddWorkdays.

----------


## walter

thanks Hitechcoach, i followed your instructions and now receive the error "run time error 3061.  too few parameters.  expected 1" with the code line "With CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)" in the fnetworkdays function.  any helpful hints on this error?  thanks!

----------


## HiTechCoach

This table tblHolidays is used to hold a list of all the holidays ypu want to avoid


Did you create the table tblHolidays? 
Does your table tblHolidays have a field named HolidayDate?

----------

