Creating a Macro

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

graphics/1_icon.jpg

In the Database window, click Macros on the Objects bar.

graphics/2_icon.jpg

Click the New button.

graphics/3_icon.jpg

Click the Action list arrow, click the action you want to use, and then press Tab.

graphics/4_icon.jpg

Type a comment if you want to explain the action.

graphics/5_icon.jpg

Click the table name in the first Action Arguments box, click the list arrow, and then select a value.

graphics/6_icon.jpg

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.

graphics/7_icon.jpg

Click the Save button on the toolbar.

graphics/8_icon.jpg

Enter a descriptive macro name that helps identify the tasks the macro carries out.

graphics/9_icon.jpg

Click OK.

graphics/13inf10.jpg

Did You Know?

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

graphics/1_icon.jpg

In the Database window, click Macros on the Objects bar.

graphics/2_icon.jpg

Click the macro you want to edit.

graphics/3_icon.jpg

Click the Design button.

graphics/4_icon.jpg

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.

graphics/5_icon.jpg

Click the Save button on the toolbar.

graphics/6_icon.jpg

When you're done, click the Close button.

graphics/13inf11.jpg

Did You Know?

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.




Show Me Microsoft Office Access 2003
Show Me Microsoft Office Access 2003
ISBN: 0789730049
EAN: 2147483647
Year: 2002
Pages: 318

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net