Sort By A Combobox Filter

  • Thread starter Thread starter David Whitaker
  • Start date Start date
D

David Whitaker

I really dont believe that is the proper terminology, but here it is

I am wanting to use a combobox for a filter
(So far so good)

Is there a way to use "Like" in a sort from a combobox's afterupdate event?

I am wanting to populate the combobox with the the letters A-Z and the
numbers 0-9 for people to sort by.
Can this be done?
Thanks
 
David Whitaker said:
I really dont believe that is the proper terminology, but here it is

I am wanting to use a combobox for a filter
(So far so good)

Is there a way to use "Like" in a sort from a combobox's afterupdate
event?

I am wanting to populate the combobox with the the letters A-Z and the
numbers 0-9 for people to sort by.
Can this be done?
Thanks

I don't understand what you want. Do you really want to sort records,
or just filter the form to show only the records "like" the combo box?
If you mean the former, I'm clueless as to what you have in mind. If
the latter, you can set a filter using the Like operator. For example
....

'----- start of example code -----
Private Sub cboFilter_AfterUpdate()

Me.Filter = "SomeField Like '" & Me.cboFilter & "*'"
Me.FilterOn = True

End Sub
'----- end of example code -----
 
Back
Top