Forum Discussion

Tony2021's avatar
Tony2021
Iron Contributor
Apr 30, 2022
Solved

Filter a form with a button (subform)

Hello Experts,   I have a form that I manually filter the combo box by clicking the filter icon on the field (pic below) and then I select the records I want to display.  I want to use a button for...
  • George_Hepworth's avatar
    George_Hepworth
    Apr 30, 2022

    Tony2021 

     

    Thanks for the additional information. The screenshot showed only the filter on the datasheet view, so I misinterpreted the situation. Yes, that does make it possible. 

    I would actually use a combo box, rather than a command button, though, because the button still has to have a value on which to filter and that has to come from somewhere.

    In fact that is a very standard approach to making forms more efficient by limiting records in a form's recordset. That's crucial to working with remote databases, such as SQL Server.

     

    The attached demo is intended for a very different purpose, but the combo box to filter a recordset in a subform is pretty much the same as what you need and can be adapted.

     

     

Resources