Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macros or code?

Status
Not open for further replies.

dennisell

Technical User
Sep 24, 2002
14
US
I have been creating a database at my work and am 3 months into it. I am learning a lot from this project. I view this database as being pretty complex by my standards and am having performance issues (a little slow on some things).

My question is: Which will ultimately give me better performance in the database, macros or code (which on this project I am learning about, not by choice).

This may be a real simple question or a complicated one, I don't know!!

If it matters, I am very new to even looking at the code window but am quickly becoming unintimidated with it quickly, thanks to this forum.

Dennis
 
As far as I am aware, code (especially well-written, compiled code) should be faster than the corresponding macro. As a result, you may find that the only macros you ever need are AutoExec and AutoKeys. [pc2]
 
Dennis,

If you're at the point of asking this question, the answer is clear: dump the macros and get into the code. One of the biggest reasons is that in code you can handle errors that arise, whereas this is not possible in macros. But also your database will be so much easier to understand if you use code, and so much easier to build, modify, and maintain.

If you're not intimidated by the code there is zero reason for you to hold off. Convert every one of your macros to code and start doing everything new in code. If you can't figure something out, 1) do it in a macro and convert it, 2) read about it in the help files 3) search here and at groups.google.com for comp.databases.ms-access, as 99% of the questions asked have already been answered, 4) run to the store and buy the Access [version number] developer's Handbook, as this will earn back it's cost in a month or less, and 5) post here or at cdma with questions, when you can't find the answers.

Welcome to the world of coding. It's a complete gas, and you'll be amazed at how quickly you pick it up, if you really dive into it.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top