Show All

Create a macro or macro group

You can create a macro to perform a specific action or a macro group to perform a series of actions.

Create a macro

  1. In the Database window, click Macros under Objects.
  2. Click the New button on the Database window toolbar.
  3. Add an action to the macro.

    How?

    1. In the Macro window, click the first empty row in the Action column. If you want to insert an action between two action rows, click the selector for the action row just below the row where you want to insert the new action, and then click Insert Row on the toolbar.
    2. In the Action column, click the arrow to display the action list.
    3. Click the action you want to use.
    4. In the lower part of the window, specify arguments for the action, if any are required. For action arguments whose settings are a database object name, you can set the argument by dragging the object from the Database window to the action's Object Name argument box.
    5. Type a comment for the action. Comments are optional.
  4. To add more actions to the macro, move to another action row and repeat step 3. Microsoft Access carries out the actions in the order you list them.

Create a macro group

If you want to group several related macros in one place rather than keeping track of them separately, you can organize them as a macro group.

  1. In the Database window, click Macros under Objects.
  2. Click the New button on the Database window toolbar.
  3. Click Macro Names on the toolbar, if it isn't already selected.
  4. In the Macro Name column, type a name for the first macro in the macro group.
  5. Add the actions you want the macro to carry out.

    How?

    1. In the Macro window, click the first empty row in the Action column. If you want to insert an action between two action rows, click the selector for the action row just below the row where you want to insert the new action, and then click Insert Row on the toolbar.
    2. In the Action column, click the arrow to display the action list.
    3. Click the action you want to use.
    4. In the lower part of the window, specify arguments for the action, if any are required. For action arguments whose settings are a database object name, you can set the argument by dragging the object from the Database window to the action's Object Name argument box.
    5. Type a comment for the action. Comments are optional.
  6. Repeat steps 4 and 5 for any other macros you want to include in the macro group.

Notes