I want to count the number of days reference a shipping order. I need to exclude weekends and holidays. Thank you.
Hello Dean,
This thread:
Calculate end date (working day) in Access has a function written to count week days (excluding week-ends).
Excluding holidays will be a little more difficult, since these change depending on country, region, etc. As far as I know, Access/VBA does not have a list of holidays built-in so you will likely have to create one that applies to your corner of the world.
To do this, you'll create a table, call it tblHolidays, give it a primary key of HolidayID Autonumber, second field is HolidayDate, third is HolidayName.
You'll have to open this into a recordset programatically and loop through comparing each date with the fixed holiday date to get your day count minus holidays. Then you can run the result through the weekday count function to return a final number of working days.
We'll be happy to help on any parts of this you don't understand, or get stuck on, but we'll wait until you make a start since we can't do the work for you :-)
Regards,
Scott