Search code examples
ms-accesscomboboxfilterms-access-2007

How to set the first continuous combobox invisible in Access 2007?


I'm trying to add an OR feature in the Continuous Filter Form and as you can see the first combobox shows up which I don't want it to show. Ideally, it should show only when the user wants the second row search option not in the first row filter. I have only OR in the combobox. Thanks for your help and let me know if you need any clarification! enter image description here


Solution

  • Continuous form controls are all or nothing. If it's visible, it's visible in all rows, if invisible, it's invisible in all rows. There's nothing you can do about that.

    You have four options (in order of complexity):

    First Option: The "On Current" event of the form happens when a user moves from one row to another inside the continuous form. you can add an IF statement to that event that disables the first box if the user has moved to the first row.

    Second Option: Have a fixed amount of filter boxes, and don't let the user pass the limit

    Third Option: Have a fixed amount of filter boxes, but make a "forward" and "back" buttons that will change what data the filter boxes link to, effectively making a 'custom' continuous form

    Fourth Option: Dynamically create the textboxes programatically (not recommended)