PC Tips and Tricks to make your life easier

Creating An Access Macro

March 02, 2010 By: lilybird Category: Software

You don’t necessarily have to use programming to make MS Access more automated. You can create an Access macro in order to automate a lot of database tasks, which will add much more functionality to your Access database. MS Access allows you to assign a macro to a command button instead of using a toolbar commands. This way you will be just one click away from printing a report.

There are different Access versions and depending on the one you are using, some of the naming may differ from the way it is described here, but he meaning is mostly the same, so you will be able to define what to do in your database editions.

First, you should go to the macro designer and type in the name of a new Access macro in the Macro Name column. If you are going to print an invoice report, for example, you could name your macro something like “PrintInvoiceReport”. After you have entered the name, you should click on the arrow to open a drop down menu and select the Open Report action. Now, if you go to the bottom of the screen, you will see a box where you can enter action arguments. Here you will have to enter the report you need to open. Now you should choose the desirable report view. So, if you want to preview the report only, you can select the option to print preview, if not, then select the print option right away.

There is also a comment column, but this one is optional, even though it can be useful for entering some details about what macro is actually doing. It will be very useful to you as well as other developers and database users, who will also have it clear about the macro purpose.

Now, after accomplishing the above steps, you should only save the macro and name it. Name it differently from the designer version. You can temporarily name it Macro1, but always rename it later.

The next stage is wiring the MS Access macro to the command button. You can use already created form or if you don’t have the suitable one, you can create a blank form and go to its design view. Then you can use the wizard and follow its steps to create a command button and move it to the form. When the wizard starts, you should select the miscellaneous form option on the left. Then, in the right hand box, you should select the option to run macro. Now click Next to move on and select the macro you want to run and click Finish.

Now you can run the form and click the command button. You should see your report opening in the selected view. Now you can use this powerful tool for automating your MS Access database.

Need help with access database training – this web site with microsoft access database advice and assistance can be the one that you’ve been looking for.

And a final piece of advice – today the Internet technologies give you a really unique chance to choose exactly what you need for the best price on the market. Funny, but most of the people don’t use this opportunity. In real life it means that you should use all the tools of today to get the info that you need.

Search Google or other search engines. Visit social networks and have a look on the accounts that are relevant to your topic. Go to the niche forums and participate in the discussion. All this will help you to create a true vision of this market. Thus, giving you a real opportunity to make a wise and nicely balanced decision.

And also sign up to the RSS feed on this blog, because we will everything possible to keep this blog tuned up to the day with new publications about microsoft access database industry.

Leave a Reply