I have 2 option boxes with 3 radio buttons on each of them. They are deigned to fitler my subform depending on the selections.
They both work great independently but neither work together. The first option box is to select view only pass, fail or both. The second is to select male, female or both.
If I chose males that passed it only chooses the second option to displaying ignoring the other filter (this data is already filtered by drop downs) so I only see males. I want to make them dependent on each other so it displays exactly what both are asking.
The code I have for these I got help with elsewhere on here (some one else asked) and is as follows:
Private Sub Frame29_AfterUp date()
Select Case Me!Frame29
Case 1
Me![front screen data subform].Form.Filter = "[Pass or Fail] = 'Pass'"
Me![front screen data subform].Form.FilterOn = True
MsgBox "You have requested to view students who have Passed only"
Case 2
Me![front screen data subform].Form.Filter = "[Pass or Fail] = 'Fail'"
Me![front screen data subform].Form.FilterOn = True
MsgBox "You have requested to view students who have Failed only"
Case 3
Me![front screen data subform].Form.Filter = ""
Me![front screen data subform].Form.FilterOn = False
MsgBox "You have requested to See All Records"
End Select
End Sub
Private Sub Frame38_AfterUp date()
Select Case Me!Frame38
Case 1
Me![front screen data subform].Form.Filter = "[Male Female] = 'M'"
Me![front screen data subform].Form.FilterOn = True
Case 2
Me![front screen data subform].Form.Filter = "[Male Female] = 'F'"
Me![front screen data subform].Form.FilterOn = True
Case 3
Me![front screen data subform].Form.Filter = ""
Me![front screen data subform].Form.FilterOn = False
End Select
End Sub
Any suggestions on how to make them dependent??
They both work great independently but neither work together. The first option box is to select view only pass, fail or both. The second is to select male, female or both.
If I chose males that passed it only chooses the second option to displaying ignoring the other filter (this data is already filtered by drop downs) so I only see males. I want to make them dependent on each other so it displays exactly what both are asking.
The code I have for these I got help with elsewhere on here (some one else asked) and is as follows:
Private Sub Frame29_AfterUp date()
Select Case Me!Frame29
Case 1
Me![front screen data subform].Form.Filter = "[Pass or Fail] = 'Pass'"
Me![front screen data subform].Form.FilterOn = True
MsgBox "You have requested to view students who have Passed only"
Case 2
Me![front screen data subform].Form.Filter = "[Pass or Fail] = 'Fail'"
Me![front screen data subform].Form.FilterOn = True
MsgBox "You have requested to view students who have Failed only"
Case 3
Me![front screen data subform].Form.Filter = ""
Me![front screen data subform].Form.FilterOn = False
MsgBox "You have requested to See All Records"
End Select
End Sub
Private Sub Frame38_AfterUp date()
Select Case Me!Frame38
Case 1
Me![front screen data subform].Form.Filter = "[Male Female] = 'M'"
Me![front screen data subform].Form.FilterOn = True
Case 2
Me![front screen data subform].Form.Filter = "[Male Female] = 'F'"
Me![front screen data subform].Form.FilterOn = True
Case 3
Me![front screen data subform].Form.Filter = ""
Me![front screen data subform].Form.FilterOn = False
End Select
End Sub
Any suggestions on how to make them dependent??
Comment