I have developed a form that has a several work tasks assigned to individual engineers. I have programmed a combo using the Filter command and a command button to allow the user to select the engineer and then click the button to apply the form filter in respect to the combobox engineer. This works great, but now I have added two radio buttons, to allow the user the option of filtering work tasks that are within 12 weeks of execution and thos tasks that are beyond the 12 week period, which each version of code working perfectly independently, but I cannot figure out how to tie all three sets of code together, it seems to be loading applying the last filter in the code only. Any assistance would be greatly appreciated - - I have been working on this for 8 hours straight and have at my wits end!!!
Thank you,
Moonman
Private Sub Command166_Click()
Me.Filter = "[tblMain.Engineer] = '" & Me.Combo162 & "'"
BeginDate = Date
EndDate = DateAdd("d", "84", Date)
EndDate2 = DateAdd("d", "84", EndDate)
If (Me.Option156 = True) Then
Me.Filter = "[Start] BETWEEN #" & BeginDate & "# AND #" & EndDate & "#"
Else
MsgBox "You currently have no assigned work activities for T-0 thru T-12"
End If
If (Me.Option158 = True) Then
Me.Filter = "[Start] BETWEEN #" & EndDate & "# AND #" & EndDate2 & "#"
ElseMsgBox "You currently have no assigned work activities at T-13 and beyond"
End If
Me.FilterOn = True
End Sub