Microsoft Access Database: Why I Don’t Use Microsoft Access Macros

Microsoft Access Database: Why I Don’t Use Microsoft Access Macros

I’m often asked about Microsoft Access Macros and Access Modules (VBA) and why we have two ways to program and automate an Access design database application.

They both provide a way to automate your database but are very different from each other indeed when designing and applying these objects.

access macrosWhy Access Macros In The First Place?

It’s more of an historical answer and simply put it was the first and only form of automating your Microsoft Access database from the very beginning (first released in 1992). Microsoft Access VBA soon arrived giving more power and flexibility but required some programming knowledge to fully utilise it.

Microsoft Access Database: Why I Don’t Use Microsoft Access Macros

The main reason is a personal one; I’m a programmer and therefore find this a more natural way to Access automate your database. But here are some other impartial reasons:

  1. You cannot debug an Access macro where there are tools for VBA Modules.
  2. Since there is no macro recorder (as with other Microsoft Office applications), you have to write the code in all cases.
  3. There are no error handling code procedures for an Access macro and therefore the system will fail and halt the application. VBA code has ways to handle errors gracefully.
  4. A lot of automation required goes beyond the basic commands that macros can provide especially when wanting to communicate with other applications outside of Microsoft Access and therefore have limited flexibility.

Access macros still have a place and shouldn’t necessarily be dismissed as it is still used in modern versions of Microsoft Access (2010). In fact, Microsoft have turned back to macros once again using embedded Access macros as the first choice along with more powerful and improved data macros.

As a programmer, habits are hard to break!

This entry was posted in Macros, Modules, MS Access, Utilities, VBA and tagged , , , , . Bookmark the permalink.

6 Responses to Microsoft Access Database: Why I Don’t Use Microsoft Access Macros

  1. Walter March says:

    Great post. I haven’t gotten in to the newer versions of Access yet (sadly) but back in the day (2k versions) you used to be able to convert an Access Macro to VBA. I found that helpful when I wanted to get a jump start on something but still be able to leverage the power of VBA.

  2. Ben says:

    Using the DoCmd object handles menu commands from the Access application and therefore any workflows or commands outside this area will not be included. Then again not all commands are available from the DoCmd object too but probably are called via another object like ‘Application’. No, Macros can’t do everything especially when wishing to wrap functions together and communicate with other applications.

  3. Can’t you do everything you would do with macros programatically using the DoCmd object? With the exception of AutoExec, which you can bypass using the Tools/Startup menu options.

  4. Ben says:

    Take a look at another post which provides a link that covers the essentials for you Choose Between Microsoft Access and Excel.

  5. M-Ayoub Sherzad says:

    What is the different using Database in Access or Excell?

  6. Ben Beitler says:

    Using Access macros do have certain beneifts and uses which includes the ability to assign keystrokes, run VBA code functions and auto start routines. There are some reserved keyword names when creating Access macros and include ‘AutoKeys’ and ‘AutoExec’.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Confirm you are human.