Using Temporary Variables

You can use a temporary variable in Access to store a value that can be used in other macros, event procedures, expressions, and queries. As you’ll learn in Chapter 24, we use a variable to store the user name when you log into the Conrad Systems Contacts and Housing Reservations sample databases. Variables are very useful when you need Access to remember something for later use. You can think of a temporary variable in a macro as writing yourself a note to remember a number, a name, or an address so that you can recall it at a later time. All variables have a unique name. To fetch, set, or examine a variable, you reference it by its name. Temporary variables stay in memory until you close the database, assign a new value, ...

Get Microsoft® Access® 2010 Inside Out now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.