L
Lee
Hello there,
I've got a form with a date text box on it. When the
date is a Saturday I'd like a checkbox ticked
(called 'SatCheck') and the same if the date is a
Wednesday (WedCheck). I've got the following code on the
AfterUpdate event of the Date text box but it doesn't
work.......what am I doing wrong here!!? This should be
so simple but I'm stuck!
Private Sub txtDate_AfterUpdate()
Dim TodaysDate, DayOfWeek
TodaysDate = txtDate
DayOfWeek = WeekDay(TodaysDate)
If DayOfWeek = 7 Then
SatCheck = True
ElseIf DayOfWeek = 4 Then
WedCheck = True
Else
SatCheck = False
WedCheck = False
End If
End Sub
Hope you can help me with this!
Thanks in advance,
Lew
I've got a form with a date text box on it. When the
date is a Saturday I'd like a checkbox ticked
(called 'SatCheck') and the same if the date is a
Wednesday (WedCheck). I've got the following code on the
AfterUpdate event of the Date text box but it doesn't
work.......what am I doing wrong here!!? This should be
so simple but I'm stuck!
Private Sub txtDate_AfterUpdate()
Dim TodaysDate, DayOfWeek
TodaysDate = txtDate
DayOfWeek = WeekDay(TodaysDate)
If DayOfWeek = 7 Then
SatCheck = True
ElseIf DayOfWeek = 4 Then
WedCheck = True
Else
SatCheck = False
WedCheck = False
End If
End Sub
Hope you can help me with this!
Thanks in advance,
Lew