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.

Get Beginning Access™ 2007 VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.