I'm trying not to schedule courses around lunch time, but the following code I use will not schedule untill the LunchEnd time:
If TimeBeg >= rsShifts!LunchBegin And CDuration <= rsShifts!LunchEnd Then
TimeBeg = rsShifts!LunchEnd
End If
If TimeBeg >= rsShifts!LunchBegin And CDuration >= rsShifts!LunchEnd Then
TimeBeg = rsShifts!LunchEnd
End If
If TimeBeg <= rsShifts!LunchBegin And CDuration >= rsShifts!LunchEnd Then
TimeBeg = rsShifts!LunchEnd
End If
If TimeBeg <= rsShifts!LunchBegin And CDuration <= rsShifts!LunchEnd Then
TimeBeg = rsShifts!LunchEnd
End If
I started with the first If, End If statement and it helped by not scheduling classes if the TimeBeg was greater than the LunchBegin. But I still had problems with if a class was scheduled before LunchBegin and the CDuration, which is the end of the class was schedule in between the Lunch Time.
Could anyone help pleasssseeeee...