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

Chapter 10. Working with Forms > Opening and Closing Forms

Opening and Closing Forms

In the first part of this book, you learned the basics of the VBA language. Now it’s time to start applying your skills to Access. This chapter covers the use of VBA with one of the most commonly used Access objects: the form. You’re no doubt familiar with Access forms from developing applications. As a first step, you learn how to open and close forms using VBA.

Opening a Form

You already saw the code to open a form in Chapter 8’s case study. But it’s worth reviewing again, to make sure you understand what’s going on. The DoCmd object is the key to unlocking many of VBA’s capabilities to automate Access. There is one DoCmd object open at all times; you can neither create it nor destroy it. What you can do is use its methods. These methods let VBA code interact directly with Access-specific objects.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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