Another combo question

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

David Whitaker

I am trying to sort by 2 conditions combined
a combobox and a option group

when I try to combine the two, my sort comes back blank
the code will work with one or the other but not combined, I think my
problem is how I am combining the two

Me.Filter = "stock = 'inventory'" = "dim = """ & Me.Combo75.Value &
""""
Me.FilterOn = True

What did I get wrong?
 
"David Whitaker"
I am trying to sort by 2 conditions combined
a combobox and a option group

when I try to combine the two, my sort comes back blank
the code will work with one or the other but not combined, I think my
problem is how I am combining the two

Me.Filter = "stock = 'inventory'" = "dim = """ & Me.Combo75.Value &
""""
Me.FilterOn = True


You can use And and Or to combine multiple criteria.

Me.Filter = "stock = 'inventory' AND dim = """ &
Me.Combo75.Value & """"
 
Back
Top