Q
QB
I am trying to apply a filter to my form, code that I have used in the past
is not working. No matter the variations I have tried it always returns only
one record?!
Me.FilterOn = False 'Remove any existing filters
Me.Filter = "type_contact Like " & Chr(34) & "*" & Trim(Me.cbo_fltrby_type)
& "*" & Chr(34) & "" 'Build our filter
Me.FilterOn = True 'Apply our filter
I have also tried,
Me.Filter = "type_contact = '" Trim(Me.cbo_fltrby_type) & "'"
Me.Filter = "type_contact Like '*" Trim(Me.cbo_fltrby_type) & "*'"
Me.cbo_fltrby_type returns a string value and should be exactly = to the
field value type_contact.
Thank you for helping me out!
QB
is not working. No matter the variations I have tried it always returns only
one record?!
Me.FilterOn = False 'Remove any existing filters
Me.Filter = "type_contact Like " & Chr(34) & "*" & Trim(Me.cbo_fltrby_type)
& "*" & Chr(34) & "" 'Build our filter
Me.FilterOn = True 'Apply our filter
I have also tried,
Me.Filter = "type_contact = '" Trim(Me.cbo_fltrby_type) & "'"
Me.Filter = "type_contact Like '*" Trim(Me.cbo_fltrby_type) & "*'"
Me.cbo_fltrby_type returns a string value and should be exactly = to the
field value type_contact.
Thank you for helping me out!
QB