I copied and pasted this Vba into access with my tables
I then made a query with the following functions
The date due expressions can then be calculated by:
- Creating a provisional date due field and using this expression:
Provisional Date Due: DateAdd("d",13,[Loan Date])
- Then create the Date Due field with this expression:
Date Due: NextWorkDay([Provisional Date Due])
SCENARIO
A book can be on loan for fourteen days. The due date is the Loan date plus fourteen days. If the Due date falls on a day when the school is closed (e.g. during a holiday period) then the Due date becomes the date that is after the holidays
I have the tables tblholidays and field holidate with each individual date that is a holiday but I get an error with the nextworkday function and it turns up yellow? The holidate field is date/time
How can I correct this?
UPDATE:
I HAVE ATTACHED MY ACCESS DATABASE, PLZ COPY AND PASTE THE MODULE VBA: THEN RUN THE QUERY BUT IT DOESNT WORK, PLZ UPDATE THE DATABASE AND GIVE ME THE LINK OR HELP ME AS I CANNOT SOLVE THIS PROBLE
I then made a query with the following functions
The date due expressions can then be calculated by:
- Creating a provisional date due field and using this expression:
Provisional Date Due: DateAdd("d",13,[Loan Date])
- Then create the Date Due field with this expression:
Date Due: NextWorkDay([Provisional Date Due])
SCENARIO
A book can be on loan for fourteen days. The due date is the Loan date plus fourteen days. If the Due date falls on a day when the school is closed (e.g. during a holiday period) then the Due date becomes the date that is after the holidays
I have the tables tblholidays and field holidate with each individual date that is a holiday but I get an error with the nextworkday function and it turns up yellow? The holidate field is date/time
How can I correct this?
UPDATE:
I HAVE ATTACHED MY ACCESS DATABASE, PLZ COPY AND PASTE THE MODULE VBA: THEN RUN THE QUERY BUT IT DOESNT WORK, PLZ UPDATE THE DATABASE AND GIVE ME THE LINK OR HELP ME AS I CANNOT SOLVE THIS PROBLE