Are Macros Bad ?

M

Matthew

The Access MVPS Org on their website have the 10
Commandments and along the same line, I read another
Access 'expert' who proclaimed as one of his own
commandments, "Thou shall not use Macros because they will
bring you to grief".

Is that a common view amongst the experts ? And if so,
could you explain why ? Is there a performance
consideration ? For example, if we have a macro which
simply has an Open Form action - is this in any way
inferior to a Docmd.OpenForm ?

Thanks for your comments


Matthew
 
K

Ken Snell

My very first database uses almost 100% macros -- VBA is used only for
"NotInList" handling. Works very well for my purposes - a videotape
collection database for my personal use.

VBA has much more flexibility and power for error-handling, for using
variables' values, for manipulating recordsets, etc. Macros are from the
early versions of ACCESS and are limited in their scope. Also, there is
always the possibility that they would cease to be supported in some future
version of ACCESS (but that hasn't happened so far).

However, if a macro works for your purposes, then use it. Your example of
OpenForm is certainly a simple one if you can hard-code the name of the
form, or can use a control on a form as the source of the form's name. But
if you want to use a variable as the source of the form name, then a macro
will not let you do that unless you store the value of the variable in a
control on a form so that you can access that value in the macro.
 
T

tina

if you don't have any background in programming languages,
you can do a whole lot with macros to automate your
applications (if you're willing to put the time and sweat
into it) - plus you won't really know what you're missing,
so probably the limitations won't drive you crazy.
i developed Access applications for 2+ years using only
macros because i couldn't grasp VBA for the life of me.
eventually i took a class, and now i rarely touch macros.
the bonus for me is i really appreciate the advantages of
VBA, having used macros for so long.

just use what you have knowledge of, matthew, and works
for you. when you're ready to move on to VBA, whenever and
whyever, you may find (as i did) that you're working a lot
with familiar tools in a different format, which will give
you a good base from which to grow in VBA skills.

good luck! :)
 
B

Bob Dolmetsch

-----Original Message-----
The Access MVPS Org on their website have the 10
Commandments and along the same line, I read another
Access 'expert' who proclaimed as one of his own
commandments, "Thou shall not use Macros because they will
bring you to grief".

Is that a common view amongst the experts ? And if so,
could you explain why ? Is there a performance
consideration ? For example, if we have a macro which
simply has an Open Form action - is this in any way
inferior to a Docmd.OpenForm ?

Thanks for your comments


Matthew
.
Like others, I began my Access career using macros
heavily and using macros in some complicated ways to
handle conditional situations -

My problems came up when the client requested subtle
changes in the way the code worked - it was sometimes a
great pain to even locate which of several macros
controlled the situation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top