O'Reilly logo

Beginning Access™ 2007 VBA by Denise Gosnell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A.6. Chapter 6

  1. The AutoExec macro is a macro that runs each time a particular database opens. This macro is a good place to add an Open Form command to specify which form should automatically open when the database opens. For example, you may want a switchboard form to open so the user can navigate among the available forms.

  2. Combo boxes and list boxes both allow you to display data with single or multiple columns. Combo boxes can be programmed to allow a user to select a value from the drop-down list or to type in a new value. List boxes, on the other hand, require a user to select a value from the list. Combo boxes use pattern matching to find the record matching the values as you type one or more letters. List boxes jump to the first item that starts with each value that you type. List boxes allow a user to select multiple items from the list, while combo boxes only allow selection of a single item.

  3. You can use the MsgBox function to display a message box to the user. Message boxes are useful to inform the user of some error or other event, and also to ask the user questions, such as to confirm a delete action.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required