Macros in ms- access


What is a macro?

A macro is a tool that allows you to automate tasks and add functionality to your forms, reports, and controls. For example, if you add a command button to a form, you associate the button’s OnClick event to a macro, and the macro contains the commands that you want the button to perform each time it is clicked.

In Access, it is helpful to think of macros as a simplified programming language that you write by building a list ofactions to perform. When you build a macro, you select each action from a drop-down list and then fill in the required information for each action.

Macros enable you to add functionality to forms, reports, and controls without writing code in a Visual Basic for Applications (VBA) module. Macros provide a subset of the commands that are available in VBA, and most people find it easier to build a macro than to write VBA code.

For example, suppose that you want to start a report directly from one of your data entry forms. You can add a button to your form and then create a macro that starts the report.

The macro can either be a standalone macro (a separate object in the database), which is then bound to the OnClick event of the button, or the macro can be embedded directly into the OnClick event of the button itself — a new feature in Office Access 2007. Either way, when you click the button, the macro runs and starts the report.









A password will be e-mailed to you.

Feedback Form

[contact-form-7 id="98" title="Feedback Form"]