locked
Microsoft Access Form Search Box behavior RRS feed

  • Question

  • The search box at the bottom of a Access Single Form view has changed its behavior recently, (I'm using Access for Office MSO 16.0.12527.21230 64-bit), making it dangerous to use.  In the past, the focus stayed with the search box.  Now the focus moves to the control with the matching data, causing the user to change the data in the control by accident while trying to enter search criteria.

    Is there a way to either disable the search box or make it behave as it did before?

    Thursday, October 29, 2020 4:37 PM

All replies

  • Have you tried stepping through the code to determine why this happens?

    Resetting the focus to the search box in the AfterUpdate event may be a workround.


    • Edited by isladogs52 Thursday, October 29, 2020 7:56 PM
    Thursday, October 29, 2020 7:55 PM
  • In the past, the focus stayed with the search box.  Now the focus moves to the control with the matching data,

    Hi LegacySW,

    I am not familiar with A2016. But how was the control identified before when there was a match with the search box?

    Imb.

    Thursday, October 29, 2020 8:48 PM
  • I haven't written any code related to the search box.  By "search box" I am referring to the box that appears along the bottom status bar of the single form.  It's not a control that I place on the form. 

    For example, if I had a form with a record source that was a list of people I could type in the search box "Smith" and get the first person with the name "Smith". 

    Now, starting in the past couple of weeks, if I try to type "Smith" I will get the first person with the name "S" and the focus will be shifted to the control with the "S".  If I continue to type "mith" I will be changing the data in that control.

    The only workaround I could imagine is to disable all the controls on the form while someone is typing in the search box and then enable them again at some point.  A better alternative would be to disable the search box and, if I wanted the functionality of it I could create my own search box control.

    Thursday, October 29, 2020 8:51 PM
  • By "search box" I am referring to the box that appears along the bottom status bar of the single form.  It's not a control that I place on the form. 

    Hi LegacySW,

    I see now what you mean. Probably there is some setting in Tools, but I don't know.

    In A2003 there is not such a "Search" box, but I made a comparable box myself. It can be placed at the bottom of any column in a continuous form, by clicking on the column header. That column is then automatically sorted. 

    As an example see next picture:

    Imb. 



    • Edited by Imb-hb Thursday, October 29, 2020 9:31 PM
    Thursday, October 29, 2020 9:30 PM
  • in the Form property;   in the 'Other' tab;

    is the 'Cycle' property set to: All Records?

    ....btw...have never used that feature of the product .....

    Thursday, October 29, 2020 10:03 PM
  • OK - you can't modify that behaviour as you're using a built in form property.

    However, I thought it had always behaved in the way you described

    I suggest you remove the Search box by setting the Navigation Buttons property to No.

    Then add your own Search or Filter feature if you need it

    EDIT: Changing the Cycle property will not alter the Search behaviour


    • Edited by isladogs52 Thursday, October 29, 2020 10:17 PM
    Thursday, October 29, 2020 10:15 PM