I have a subform that I use for creating schedules. After choosing the employee on the main form, the subform lists dates and what the employee is scheduled for that day. The Sched column is created automatically and the Work Type column is where we adjust the schedule to accomodate holidays and sick leave.
Here is the form (the subform is in the center, called "Scheduled Days"):
URL
Since the schedule becomes very large, we wrote the following code to have the subform pull up the schedule at today's date. This is the code:
Code:
Private Sub Form_Current()
' changed by DENAs
Dim MyRec As DAO.Recordset
Dim strCriteria As String
On Error Resume Next
Me.Parent!lstSchedules = Me.Schedule
' this code try to bookmark currnet date
Set MyRec = Me.RecordsetClone
strCriteria = "SchDate=#" & Month(Date) & "/" & Day(Date) & "/" & Year(Date) & "#"
MyRec.FindFirst strCriteria
' of course if exists the current date into table
If Not MyRec.NoMatch Then Me.Bookmark = MyRec.Bookmark
Set MyRec = Nothing
End Sub
My problem is, since we have it pull up the sched for today's date, I can no longer adjust the Work Type for any date other than today. Is there a way to have it pull up the sched starting at today's date but then still be able to change the Work type for other days?
This code ([Event Procedure]) is in the On Current setting in the properties for the subform.
I am a vb noobie and the chief needs the schedule printed again tomorrow, so I sure appreciate help!!!
Thanks,
Caleb