compile/compact/repair frequency

M

Matt K.

I have been browsing this board and notice some posts talking about .mde
files "bloating" in size, slow performance of split access database on
network, etc. Discussion threads usually include mention of
"compact and repair your database"
"compile your VBA code" or "decompile your code then recompile"
I am learning how to develop my database (a2003) as I go and try to refer to
the help file as much as possible. If it was not for this forum, however, I
would never have gotten off the ground with this. Kudos to the contributors.
Maybe this is going overboard, but it has become habit eveytime I add/change
code, File>save; Debug>compile.
And when I am finished working on the db for the day, Tools>Database
Utilities>Compact and Repair Database.
QUESTION: Is this necessary? Today I notice in MSaccess
Tools>Options>General there is "Compact on close". Also in VBeditor
Tools>Options>General tab is Compile choices. Are these things happening
without me manually doing them?
I have not split my database and put it in use yet, but will soon... still
developing. I get nervous when I read some of the posts and wonder "will that
happen to mine?" I want to do this right and have a "clean, efficient,
smooth" interface for the users... sort of like a duck on a lake-from the top
it looks calm and graceful; underwater it's feet are going like hell.
 
A

Albert D.Kallal

Maybe this is going overboard, but it has become habit eveytime I
add/change
code, File>save; Debug>compile.

I also do the above....

(I uise the keyboard..and I do this so often, that it is insticnvle now..and
I don't even remember doing this).

The keystrocks I use are

ctrl-s save
alt-d, Enter key (note when you hit alt-d, the debug menu
drops down...and then you whack the enter key.

SNAP, BING, bang!.....I hit the above 3 keystockes one after antoher
ctrl-s, alt-d, whack enter key.

I then often hit alt-f4 to close the wdinow

So, yes, often we devleopers will do a compile after every change. Certanly,
as I done making changes to the code module, I will hiet ctrl-s. This ensure
my code is saved...even if the appcaton where to freezee, or crash...

And when I am finished working on the db for the day, Tools>Database
Utilities>Compact and Repair Database.

Yes, again, the above makes sense...and often, this will occur more then
once during the day....
QUESTION: Is this necessary? Today I notice in MSaccess
Tools>Options>General there is "Compact on close".

I don't mind the above....but, often hwen I am in a hurry, or have to close
the appciaton and leave, I don't want it to compact. I think this opten is
better for END USERS that dont' even know to do this. As a intelient
expaonced dvelpoer that you are, then you have your own sense as to when to
do this..
Also in VBeditor
Tools>Options>General tab is Compile choices. Are these things happening
without me manually doing them?

Well, the compile on demand is ok, but it only occurs when you run the code.
Would you not want to find/see syntax errors WHILE you are right there in
the code editor?

Of course, during development, you will hold down the shift key so your
startup settings don't run. You then develop for awhile, and then to test in
"user" mode, you exit..and then re-enter the application without the shift
key bypassed. You will likely do this dance all day long as you run/test as
user mode, and then flip back in to developer mode (shift key used..so you
don't get the main custom menu). So, you can't develop, or really modify
things when you run your application with the startup settings...so you must
shift-by-pass them when you want to work.

And, in fact, I use alt-f4 to exit the application...the mdb file should
still be highlighted in the windows explore..so, then you hit enter key
(and, hold down shift key if you need be). This key stroke sequence and
exiting and re-entering the application will occur CONSTANTLY all day long
when you are developing.

When you finally have things just right...you create the mde
you plan to distribute...
 
P

Pieter Wijnen

nice one

Pieter

Albert D.Kallal said:
I also do the above....

(I uise the keyboard..and I do this so often, that it is insticnvle
now..and I don't even remember doing this).

The keystrocks I use are

ctrl-s save
alt-d, Enter key (note when you hit alt-d, the debug menu
drops down...and then you whack the enter key.

SNAP, BING, bang!.....I hit the above 3 keystockes one after antoher
ctrl-s, alt-d, whack enter key.

I then often hit alt-f4 to close the wdinow

So, yes, often we devleopers will do a compile after every change.
Certanly, as I done making changes to the code module, I will hiet ctrl-s.
This ensure my code is saved...even if the appcaton where to freezee, or
crash...



Yes, again, the above makes sense...and often, this will occur more then
once during the day....


I don't mind the above....but, often hwen I am in a hurry, or have to
close the appciaton and leave, I don't want it to compact. I think this
opten is better for END USERS that dont' even know to do this. As a
intelient expaonced dvelpoer that you are, then you have your own sense as
to when to do this..


Well, the compile on demand is ok, but it only occurs when you run the
code. Would you not want to find/see syntax errors WHILE you are right
there in the code editor?

Of course, during development, you will hold down the shift key so your
startup settings don't run. You then develop for awhile, and then to test
in
"user" mode, you exit..and then re-enter the application without the shift
key bypassed. You will likely do this dance all day long as you run/test
as
user mode, and then flip back in to developer mode (shift key used..so you
don't get the main custom menu). So, you can't develop, or really modify
things when you run your application with the startup settings...so you
must
shift-by-pass them when you want to work.

And, in fact, I use alt-f4 to exit the application...the mdb file should
still be highlighted in the windows explore..so, then you hit enter key
(and, hold down shift key if you need be). This key stroke sequence and
exiting and re-entering the application will occur CONSTANTLY all day long
when you are developing.

When you finally have things just right...you create the mde
you plan to distribute...


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.members.shaw.ca/AlbertKallal
 
T

Tony Toews

Matt K. said:
Maybe this is going overboard, but it has become habit eveytime I add/change
code, File>save; Debug>compile.

As do I. In fact I updated the Toolbar to put the Compile icon right
on there. Among other things this helps ensure I have no typo's in
variable names. Of course I use Option Explicit and the appropriate
option in Tools > Options.
And when I am finished working on the db for the day, Tools>Database
Utilities>Compact and Repair Database.

Several times per day, I will also do a copy and paste to make a
backup copy.
QUESTION: Is this necessary? Today I notice in MSaccess
Tools>Options>General there is "Compact on close".

Compact on close has issues and can silently cause troubles. You are
far better off making a backup copy of the MDB and then compacting.
Also in VBeditor
Tools>Options>General tab is Compile choices.

Turn off Compile On Demand as that can also cause wierdnesses.
I have not split my database and put it in use yet, but will soon... still
developing.

I'd suggest splitting sooner rather than later. Not that it's a big
deal but a few things don't work on split tables. And just to get
more comfortable with it.
I get nervous when I read some of the posts and wonder "will that
happen to mine?" I want to do this right and have a "clean, efficient,
smooth" interface for the users... sort of like a duck on a lake-from the top
it looks calm and graceful; underwater it's feet are going like hell.

<chuckle> Yeah, I spend about 80% of my time in code. 75% of that
time because it's functionally required. 25% to give the users a more
efficient experience.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
M

Matt K.

Albert and Tony...
Thanks once again for your comments and suggestions...very helpful and very
much appreciated.
 

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