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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macros vs. Code

Status
Not open for further replies.

puforee

Technical User
Oct 6, 2006
741
US
I have a DB where I use macros to exercise control of objects on a form. The form consists of a main form, a sub-form, and several sub-sub forms on the sub-form. Depending on selections made on the Main and Sub-form I show or hide many different objects/sub-sub forms. I have a Check macro that is triggered by the Main Form Current event to set the active objects/sub-sub forms for each record as it is shown. This has proven to be time consuming, especially when working remote from my DB. (DB is on a server) If I change the Macros to code will this work faster?

Are there any other things I can do to speed up the checks made when I change records.

Thanks,
 
I would have to see your table structures to answer the "speed" question. Maybe your tables aren't normalized - I just don't know. So for me and others posting your tables may help.

Access translates macros to code. So skipping this step would obviously speed up the process. But if it only speeds it up by a half of second, I doubt if anyone would know.

Are you on an INTRAnet or INTERnet? You may ask your network guy to look at the transmission rates.

If an intranet, do you have a split database?
 
fneily,

Interesting that you would be interested in the tables. All I am doing with the forms is enabling and disabling Form Objects/Controls and makeing Sub-sub-forms visable or not visable. The macros do not control any data...just the objects/sub-sub-forms.

Does this help, or do you need to see the table structure still?
 
Making the forms visible tends to trigger requeries of the forms contents. If those forms are based on very large tables, or have comples filtering (especially on calculated fields) it will take a while.

AS a test, make a copy of the database, unbind the forms from the data (delete the data source) and try the macro again. If it is much faster, it is a data issue. If it is not much faster, it is a forms issue.

If is it forms, look for loops or other odd things....



SeeThru
Synergy Connections Ltd - Telemarketing Services

 
SeeThru....thanks for the advice, I now understand why the tables play a part.

But...my basic question is, which is faster when doing the same job, code or Macro's...or is their any difference.

Thanks,
 
How are ya puforee . . .

Is this a split Db secnario? [surprise]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top