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. You can use an If block in macros to test conditions and then perform different actions based on the outcome of the conditional expression.

The PrintIt submacro 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 Logic Designer, shown in ...

Get Microsoft® Access® 2010 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.