2 Combo Box Filter for a Form

K

kr

I have 2 combo boxes on FormA - Combo151 and Combo 143. I would like users
to choose from combo151 and furhter filter records with combo 143. How do i
get combo143 to correspond to combo151. this is what i have in both.
Private Sub Combo143_AfterUpdate()
If IsNull(Me.Combo143) Then 'Remove the filter
Me.Filter = vbNullString
Me.FilterOn = False
Else
Me.Filter = "[Time Zone] = '" & Me.Combo143 & "'"
Me.FilterOn = True
End If

End Sub




Private Sub Combo151_AfterUpdate()
If IsNull(Me.Combo151) Then 'Remove the filter
Me.Filter = vbNullString
Me.FilterOn = False
Else
Me.Filter = "[Segment Type] = '" & Me.Combo151 & "'"
Me.FilterOn = True
End If

End Sub

Thank you!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top