way out of my depth using Access. I spent the princley sum of £5 to buy an Access staff holiday planner that is actually quite good and I am able to to change the tables and code etc.
Currently the original Access only allowed for full days and the Tables were set to accept only 1, I have gone in and changes these to 2 and have added new descriptions to the Reason table so I now have H (Holiday) or hd (1/2 day Holiday), S (Sick) or hs (1/2 day Sick) etc. and I have adjusted were necessary all of the column widths on the forms to accomodate this but I am stumped as to how to change the report to accept 1/2 days.
Looking at the code I suspect that this may be the function that controls the days.
Code: Select all
Function MyWorkDays(Df As Date, Dt As Date) As Integer
' counts days excluding weekends and special dates
Dim n As Date, MyCount As Integer
MyCount = 1
For n = Df To Dt
If Weekday(n, vbMonday) < 6 Then
MyCount = MyCount + 1
If CountSpecDates(n) = 1 Then
MyCount = MyCount - 1
End If
End If
Next
MyWorkDays = MyCount - 1
End Function
Any help / insight would be greatly appreciated
BTW the Access template is designed by Chris Mead