none
ACCESS 2007: how to disable button that is the only enabled control on a form RRS feed

  • Question

  • ACCESS 2007 forms.

    how do you disable a button on a form if it is the parent form's only visible enabled control?

    setting cmdButton.Enabled = False throws an error if the button has the focus.

    there's no other control to take the focus.

    help.

    thanks in advance,
    e.

    Wednesday, March 6, 2013 1:57 PM

Answers

  • Create a text box without label and set its Width and Height to 0. If you also set its Border Style to Transparent, the text box will be invisible although it's not hidden.

    Before disabling the command button, set the focus to the text box.


    Regards, Hans Vogelaar

    • Marked as answer by exotericist Wednesday, March 6, 2013 4:37 PM
    Wednesday, March 6, 2013 2:05 PM