So 'main form' is frm_Employees_on Call_What_Order?
There is only one table in the db. All queries are based on this one table. All forms and subforms essentially have the same data source or are unbound. Never seen anything like this.
The Eligible (misspelled as Eligibile in label) field is on subform but then is also in the main form RecordSource but for some reason code is not recognizing the main form field. This form opens filtered to only those employees who are eligible. Can't refer to the Eligible field in subform because it might not be on the same employee record that the main form is on. Consider this code in Current event:
Code:
Private Sub Form_Current()
With Me
.OnCallDte.Enabled = .OnCall
.CallNexttDte.Enabled = .OnCall
If .OnCall = True Then
If IsNull(.OnCallDte) Or IsNull(.CallNexttDte) Then
MsgBox "Both OnCall Start and End boxes must have a date"
End If
End If
If Date >= .Set_On_Call_Week_Day_Date!one And Date <= .Set_On_Call_Week_Day_Date![seven] Then
.Next_Weeks_Start_End_Days.Enabled = False
.Following_Weeks_On_Call_Period.Enabled = False
.Final_Weeks_On_Call_Period.Enabled = False
End If
End With
End Sub
If Eligible status is changed to False then run code in its Change event to set Oncall to False, remove dates, disable controls, and refresh forms.
If Oncall status is changed then run code in its Change event to remove dates and disable boxes or notify user needs dates and enable boxes.
What is Check6 for?