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

Chapter 24. The Finishing Touches > Performing a Final Visual Basic Compile

Performing a Final Visual Basic Compile

The very last task you should perform before placing your application in production is to compile and save all your Visual Basic procedures. When you do this, Access stores a compiled version of the code in your database. Access uses the compiled code when it needs to execute a procedure you have written. If you don’t do this, Access has to load and interpret your procedures the first time you reference them, each time you start your application. For example, if you have several procedures in a form module, the form will open more slowly the first time because Access has to also load and compile the code.

To compile and save all the Visual Basic procedures in your application, open any module—either a module object or a module associated with a form or report. Choose Compile from the Debug menu, as shown in Figure 24-27. If your code compiles successfully, be sure to save the result by choosing Save from the File menu or by clicking the Save button on the toolbar. (If you have errors in any of your code, the compiler halts on the first error it finds, displays the line of code, and displays an error message dialog box.) After successfully compiling and saving your Visual Basic project, close your database and compact it as described in Chapter 5, “Modifying Your Table Design.” In Access for Windows 95, renaming your database always “decompiled” your code. This meant that if you changed the database name, you would have to compile your code again. With Access 97 and later, you don’t have to recompile the code after renaming the database file.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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