none
update a form RRS feed

  • Question


  • Hi all, I have the following question: 
    How I can update  a form whenever click on a button ?, greetings
    Monday, October 20, 2014 3:20 PM

Answers

  • In the design view double click the button and you will be taken to the code behind file, to the button's click event. 

    Button's click event will fire as soon as you click the button while running the form. The code which is included in the behind file will then execute.

    Example, if you added a button and double clicked you would see

    Private Sub CommandButton1_Click()
    
    End Sub
    

    now you enter something in between the () and End Sub like:

    Private Sub CommandButton1_Click()
        MsgBox "clicked a button!"
    End Sub
    


    • Marked as answer by aslf010990 Monday, October 20, 2014 4:18 PM
    Monday, October 20, 2014 3:59 PM

All replies

  • In the design view double click the button and you will be taken to the code behind file, to the button's click event. 

    Button's click event will fire as soon as you click the button while running the form. The code which is included in the behind file will then execute.

    Example, if you added a button and double clicked you would see

    Private Sub CommandButton1_Click()
    
    End Sub
    

    now you enter something in between the () and End Sub like:

    Private Sub CommandButton1_Click()
        MsgBox "clicked a button!"
    End Sub
    


    • Marked as answer by aslf010990 Monday, October 20, 2014 4:18 PM
    Monday, October 20, 2014 3:59 PM
  • ok thanks, greetings
    Monday, October 20, 2014 4:18 PM