Learning to use the MS Access macro

The MS Access macro will take your databaseof the form to open in the macro designer and
into a new dimension. You can write powerfulvoila, we have just written an automation
automation features without having to learn anystatement without any program code. We could
complex programming code. Normal 0 false falsedo the same with a report.
false EN-GB X-NONE X-NONE /* Style Definitions 
*/ table.MsoNormalTable {mso-style-name:"TableWe would write an MS Access macro to
Normal"; mso-tstyle-rowband-size:0;automate routine tasks that we perform again
mso-tstyle-colband-size:0; mso-style-noshow:yes;and again. A good example is importing data. To
mso-style-priority:99; mso-style-qformat:yes;save us going up to the menus and selecting the
mso-style-parent:""; mso-padding-alt:0cm 5.4ptvarious options, we could write a macro to take
0cm 5.4pt; mso-para-margin:0cm;care of it.
mso-para-margin-bottom:.0001pt; 
mso-pagination:widow-orphan; font-size:11.0pt;A macro consists of actions. We can add a series
font-family:"Arial","sans-serif";of actions to a single macro. We can also write a
mso-ascii-font-family:Arial;macro condition. For example, our macro condition
mso-ascii-theme-font:minor-latin;could determine which button was clicked on the
mso-fareast-font-family:"Times New Roman";form and perform the correct macro action that
mso-fareast-theme-font:minor-fareast;is needed.
mso-hansi-font-family:Arial; 
mso-hansi-theme-font:minor-latin;Although an MS Access macro has limited
mso-bidi-font-family:"Times New Roman";debugging features, it does allow us to step
mso-bidi-theme-font:minor-bidi;}through each line to pinpoint what went wrong.
The general features of MS Access allow us toYou cannot recover from the error easily as is
create some great systems. However, there willthe case with VBA programming.
be times when we want to do something which 
goes beyond what can be achieved with the basicSome people use a macro for practically
functionality. The MS Access macro will take youreverything in their applications, although this is not
database into a new dimension.recommended. Whilst they are very powerful
 tools it is better to use them sparingly and only
Some people may find the idea of programmingfor certain tasks.
or learning VBA program code off putting. To 
some it can be challenging, rewarding even, toA very well known MS Access macro is called
others a chore best avoided. There is a way‘AutoExec’. This is the first thing that
around this though.gets run when a database is opening. You might
 add a macro action to open a form and move to
MS Access macros offer a halfway housea certain record. You could then name the whole
between general functionality and fully blownmacro ‘AutoExec’ and the actions inside
programming. Essentially, behind the scenesit would get run as soon as the database opens.
macros are VBA program code, but to the user 
they appear as one line action statements. ForBy using the MS Access macro you will not only
example we could use a macro to open a form.add greater power to your applications, but you
The macro action would be calledwill also experience a whole new way of doing
‘OpenForm’. We just pass it the namethings.