Form List box unfilter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jhust
    New Member
    • Sep 2019
    • 1

    Form List box unfilter

    I have a form that uses a text box and combo box to filter a list box. When I use the combo box to filter the data the list box does not unfilter when I click my clear button. If I use the text box it does. The listbox is created from a query. The code for the button is below. The name of the list box is SearchResults.

    Code:
    Private Sub BtnClearFilter_Click()
         
        Me.SearchFor = ""
        Me.SrchText = ""
        Me.CboSource.Value = Null
        Me.CboSourcePart.Value = Null
        Me.SearchResults = Me.SearchResults.ItemData(1)
        Me.SearchFor.SetFocus
        Me.SearchResults.Requery
        
            
    End Sub
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3662

    #2
    jhust,

    Welcome to Bytes!

    Without knowing how the record source for your list box is created, we are unable to help you here. Obviously, when unfiltering, the .Requery action is producing identical results. But, without seeing the underlying query, we don't know where it is getting its data.

    Standing by for more details.

    Comment

    Working...