Helen,
There is nothing wrong with using Macros; they have been available in Access
since its earliest versions. Macros are one reason why MS Access is so
popular with non-programmers - they can have their databases perform
functions without knowing how to write VBA code. Modules (or more
specifically the VBA code in them) is why Access has become so popular among
developers - it is possible to perform some extremely sophisticated,
complicated processes in Access using VBA code, Windows API calls, etc.
One reason why many programmers recommend against macros is that, over time,
a successful database will need to have additional functionality or
processes added to it - simply because users like the database and want it
to do more! At some point, the processes in the database become more
sophisticated and the number of actions performed by the macros start
increasing. Often, that is where the trouble starts because, if a process
run by a macro with multiple actions fails, it can be difficult to
next-to-impossible to debug it. With code in a module, one can determine
exactly the line which has failed which makes it much easier to find and fix
problems. Also, I think it is safe to say that there are things that one
can do with code that cannot be done with a macro.
--
Cheryl Fischer
Law/Sys Associates
Houston, TX
Helen Allen said:
I am very much a novice. I am trying to learn how to program my database,
and I have a question, (probably a dumb one to y'all), but need to know
before I continue. Could someone tell me why a module would be better than
a macro? I have quite a few macros performing tasks now. As far as I have
gotten so far, macro and module seem to do the same things???