Add Code to a Control
 
 
 

Now that you have your form looking the way you want, it's time to add some code behind your controls. To open the Code window for a control simply double-click on the control in the Form window. The Code window will open, with a subroutine created for that control and its default event.

You can add code to the default event, or choose a different event from the event drop-down list at the top-right corner of the Code window.