Before you begin creating a macro, you should plan the actions required to complete the tasks you want to automate. Practice the steps needed to carry out the operation and write them down as you go. Finally, test your written instructions by performing each of the steps yourself.
Create and Save a Macro
|
In the Database window, click Macros on the Objects bar.
|
|
Click the New button.
|
|
Click the Action list arrow, click the action you want to use, and then press Tab.
|
|
Type a comment if you want to explain the action.
|
|
Click the table name in the first Action Arguments box, click the list arrow, and then select a value.
|
|
To add more actions to the macro, click the right side of a new Action row, and repeat steps 2 through 5. The macro will carry out the actions in the order in which you list them.
|
|
Click the Save button on the toolbar.
|
|
Enter a descriptive macro name that helps identify the tasks the macro carries out.
|
|
Click OK.
|
You can create a macro that runs when an Access file opens. Create a macro containing the actions you want to run when you open the database, and then save the macro with the name AutoExec. The next time you open the database, the macro runs.
|
Edit an Existing Macro
|
In the Database window, click Macros on the Objects bar.
|
|
Click the macro you want to edit.
|
|
Click the Design button.
|
|
Change the actions and arguments you want.
|
To insert a new action, click the Insert Rows button on the Macro Design toolbar.
To remove an action, select the action row, and then click the Delete Rows button.
|
Click the Save button on the toolbar.
|
|
When you're done, click the Close button.
|
You can create a new macro based on an existing one. Open the macro in Macro Design view, and then click the Save As command on the File menu. Give the macro a new name, and then modify the new macro as needed.
|
|