• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Working with Forms > The Form Module and Event Handling

The Form Module and Event Handling

All the procedures you’ve seen so far in this chapter have been located in standard modules. But as you’ve already seen several times in this book, VBA code can also be associated directly with a form. Every form in your Access application can have its own form module. The form module is saved as a part of the form so that if (for example) you copy the form to another database, the form comes along with it.

One type of code that is stored within the form module is the event procedures for the form. These procedures are called when something happens to the form or to a control on the form. For example, clicking a button on a form calls the event procedure associated with the button’s Click event. Here’s how you can add a Close button to the Clients form:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint