Hi ! I have two types of filters: one is with combo box and the other with option group. If I select the option on the option group box and then the option in the combo box, the filter works fine. However, if I choose the combo box first, the filter in the option group opens a pop up window asking for introduce the option.Even though I write the option, the filter doesn´t work. Any thoughts ?
The code for the combo box and option group are the following :
===============================================
The code for the combo box and option group are the following :
===============================================
Code:
Private Sub cc_deq_combo_box_AfterUpdate()
'Code Tags Added by Uncle Gizmo
Dim CC_DEQ As String
CC_DEQ = " SELECT LISTA_EQ.ID, LISTA_EQ.[No INV], LISTA_EQ.DESCRICAO, LISTA_EQ.MARCA, LISTA_EQ.MODELO, LISTA_EQ.[Num_SERIE / MATRICULA] " _
& " FROM LISTA_EQ " _
& " WHERE ([CC_DEQ] = " & Me.cc_deq_combo_box & ") " _
& " ORDER BY [No INV] "
Me.subInfoResults.Form.RecordSource = CC_DEQ
Me.subInfoResults.Form.Requery
End Sub
===============================================
Private Sub status_box_Click()
Dim strFilter As String
Select Case [status_box]
Case 1
strFilter = "[STATUS] = 'AV'"
Forms!SEARCH.subInfoResults.Form.Filter = strFilter
Forms!SEARCH.subInfoResults.Form.FilterOn = True
Case 2
strFilter = "[STATUS] = 'SV'"
Forms!SEARCH.subInfoResults.Form.Filter = strFilter
Forms!SEARCH.subInfoResults.Form.FilterOn = True
Case 3
strFilter = "[STATUS] = 'PQ'"
Forms!SEARCH.subInfoResults.Form.Filter = strFilter
Forms!SEARCH.subInfoResults.Form.FilterOn = True
Case 4
strFilter = "[STATUS] = 'ABATE'"
Forms!SEARCH.subInfoResults.Form.Filter = strFilter
Forms!SEARCH.subInfoResults.Form.FilterOn = True
Case 5
strFilter = "[STATUS] = '?'"
Forms!SEARCH.subInfoResults.Form.Filter = strFilter
Forms!SEARCH.subInfoResults.Form.FilterOn = True
End Select
End Sub
Last edited by a moderator: