Monday, June 4, 2012

How to create and restore macro in MS Access 2007?

-->
Introduction: A macro refers to a set of actions that automate routine and repetitive tasks. It enables you to add functionality to your control, report and form. By using it, you can actually record the steps that you want to perform to accomplish a specific task. For example, to print a form you will have to follow three steps, Select-> Print-> Ok from Print dialog box. Instead of performing these steps manually, you can automate the task by recording all the steps in a macro. Later, you can play back your macro and MS Access will automatically perform all steps for you. You can also set a button to run the macro. This way you can save your precious time and the best part is that you don't have to write a programming code in VBA to build a macro. It is easier to build a macro rather than writing a long VBA code.

Creation of macro: You can create a macro by using Macro Builder available in Access 2007. Followings are the steps to create macro.

  1. Go to Create tab in the Other group and click Macro. In the Macro Builder window, you build the list of actions that you want to perform out when the macro runs. 


  1. Now add an action that you want to perform in the Action column. Click the drop down arrow and select your first action. You can add as much action in the Action column by clicking on next row.


  1. You can also add Argument in the Action Argument pane such as what string to display in a message box, which control to operate on etc.

       

  1. Save your macro by clicking File-> Save. Enter the name of macro and click OK to save it.

Corruption in Macro: MS Access macros get corrupt due to various reasons like malfunctioning of MS office, Operation system crash, virus infection, unexpected system shutdown and many more.

How to restore? You can easily restore your corrupt macros data from a valid and updated backup. However if no backup is available then you should try an excellent third party Microsoft Access repair program to recover your data.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...