Understanding Conditional Expressions

In some macros, you might want to execute some actions only under certain conditions. For example, you might want to update a record, but only if new values in the controls on a form pass validation tests. Or you might want to display or hide certain controls based on the value of other controls.

The PrintIt macro in the DoReport macro group is a good example of a macro that uses conditions to determine which action should proceed. Right-click the DoReport macro in the Navigation Pane, and then click Design View on the shortcut menu to see the Macro window. Click in the Condition column of the first line of the PrintIt macro, and press Shift+F2 to open the Zoom window, shown in Figure 18-11. (If you can’t see ...

Get Microsoft Office® Access 2007 Inside Out 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.