ms-accessmacrosvba

What are the Pros and Cons of VBA Code vs Macros in MS Access?


I have been working on a database and wanted to do it using purely VBA codes. However, I was told by a friend that its more secure for me to use macros because the database will be used on a local network. I am not very verse in the use of macro but if its better way for the database then let me know the pros and cons. and if I decide to later migrate the database to sql will there be problems. the first database I did had a generated errors with with older versions of access which created my inclination to VBA. I know this question is made to sound complex but I just basically want some guidance as to pros and cons of VBA vs Macros in access.


Solution

  • In most of the more professional Access applications (not web apps) I've worked on, we only used one macro and it was named AutoExec. When you create a Macro and name it AutoExec, it's the very first thing that will run (even before the form you have set as your main form). This macro is usually used do things like hide UI elements, establish connection strings, link tables, and popup a login form, most of which probably has to be done by calling VBA functions from the macro.