I tried your new code, thanks. No luck, it shows 2 weeks available, i.e. 4 command buttons, not just 2. Here is a pic of form with code being run.
This is an add on module for a database I wrote that it is very date/time sensitive so therefore the odd date criteria. It is necessary thought for it to function.
I have just about lost my religion over this and so when this happens, I generally scrap it all and try something else.
I do appreciate all of the help I have got from this forum a lot! For now at least I have revised the form and will use a simple calendar to set dates.
Downside of this is that the user can screw up, but oh well, can't have cake and eat it too all the time. Here is a pic of new form.
I removed all dead code and here is the complete procedure as is right now.
Private Sub Form_Current()
Me.FirstThursday.Enabled = Me.one <= Date And Date <= Me.two
Me.FirstWednesday.Enabled = Me.one <= Date And Date <= Me.two
Me.SecondThursday.Enabled = Me.three <= Date And Date <= Me.four
Me.SecondWednesday.Enabled = Me.three <= Date And Date <= Me.four
Me.ThirdThursday.Enabled = Me.five <= Date And Date <= Me.six
Me.ThirdWednesday.Enabled = Me.five <= Date And Date <= Me.six
Me.FourthThursday.Enabled = Me.seven <= Date And Date <= Me.eight
Me.FourthWednesday.Enabled = Me.seven <= Date And Date <= Me.eight
If DCount("EmployeeID", "Employees", "eligible=True") = 4 Then 'only show 4 records
Me.OnCall.Enabled = False
End If
If OnCall = True Then ' Is On Call
ExpName_Label.Visible = True ' shows label which says Is On Call
Else
ExpName_Label.Visible = False
End If
If OnCall = False Then 'shows label Is NOT On Call
Label117.Visible = True
Else
Label117.Visible = False
End If
If IsNull(Text109) Then
OnCall.Enabled = False
End If
End Sub