How to enable/disable button control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • benchpolo
    New Member
    • Sep 2007
    • 142

    How to enable/disable button control

    I have 2 button control ADD and EDIT and referencing a Data Entry form. Within the Data Entry form there are buttons ADD. I want to disable the ADD button when the EDIT button is selected in the main menu. I don't want the client adding records on EDIT mode of the Data Entry form. Make sense?

    Thanks.
  • dsatino
    Contributor
    • May 2010
    • 393

    #2
    set the openargs property of the form to true/false depending on which button is pushed.

    In the open event of the form, set the enabled property of the button to the openarg value

    Comment

    • benchpolo
      New Member
      • Sep 2007
      • 142

      #3
      The button is in another form (MAIN) and I want to disable it on form load when the other form loads.

      Comment

      • Mudassir
        New Member
        • May 2012
        • 85

        #4
        when you click on edit button it redirects you to another page where there is button of Add, so you need to take a session variable and on page load on next page on which add button is there, check the session , and if the session is not null, set the btnAdd.Enabaled =false;
        chill

        Comment

        Working...