Can someone help me loop this?
If Weekday(4) Then
If Time() < TimeValue("18:30") Then
Me.cmbShifts = Me.cmbShifts.ItemData(0)
End If
End If
If Weekday(5) Then
If Time() < TimeValue("18:30") Then
Me.cmbShifts = Me.cmbShifts.ItemData(2)
End If
End If
If Weekday(6) Then
If Time() < TimeValue("18:30") Then
Me.cmbShifts = Me.cmbShifts.ItemData(4)
End If
End If
If Weekday(7) Then
If Time() < TimeValue("18:30") Then
Me.cmbShifts = Me.cmbShifts.ItemData(6)
End If
End If
If Weekday(4) Then
If Time() < TimeValue("18:30") Then
Me.cmbShifts = Me.cmbShifts.ItemData(0)
End If
End If
If Weekday(5) Then
If Time() < TimeValue("18:30") Then
Me.cmbShifts = Me.cmbShifts.ItemData(2)
End If
End If
If Weekday(6) Then
If Time() < TimeValue("18:30") Then
Me.cmbShifts = Me.cmbShifts.ItemData(4)
End If
End If
If Weekday(7) Then
If Time() < TimeValue("18:30") Then
Me.cmbShifts = Me.cmbShifts.ItemData(6)
End If
End If