Solved Compacting Error - Almost

G

Guest

Access 2003, Windows 2000
I have 30 databases that run at the end of the month to collect performance
metrix; total run time is about 17 hrs. I have an additional database that
runs each of the 30 dbs one after the other and logs start time and end time.
Also in this db, with vba, I compact each of the 30 after the run is
complete. I use Windows 2000 "task scheduler" to start the main db on Sunday
afternoon - Of course I am not at work on Sundays.

The probem that I have is during the compacting of each of the 30 dbs after
their individual run completes. Some of them, after compacting, generate an
error and try to send the error report to MS. The problem with this is that
it stops the subsuquent dbs from running; the initial fix to this probem was
to not compact each after running and manually compact each db (remember
there are 30) when I would get in on Mondays. The compact error seemed
strange because the compact seemed to finished properly (the dbs would be
compacted) but would still generate an error.

This is what I found.

On the dbs that compact properly with out generating an error report for MS:
On opening the VB editor, my custom reference addin "Library.mda" (located
on C drive) does not show up immediatelly in the project window - causing the
current open database to be selected by default, it takes a few seconds to
see the Library.mda reference in the project window. Also, the trees for
each project (the current open db and the reference mda) are collapsed.

On the dbs that do not compact properly:
On opening the VB editor, my custom reference addin "Library.mda" shows up
in the project window immediatelly with the tree expanded and one of its
modules selected by default. I have just found that if I lock project for
viewing, with password protection, the problem goes away - the db compacts
without error.

Therefore, to correct the problem, I need to:
1) Lock project viewing with password protection for each of the 30 dbs
or
2) Figure out how to make the project windows act as described above.

Any help on 2) would be appreciated.

Thanks.
Steve
 
T

TC

What is the text of the error message that occurs?

Or is it just the generic, "Access has encountered a problem & will
have to close" ?

TC
 
D

Danny J. Lesandrini

Steve:

Thanks!

I've been using a library that a friend supplied and I've been seeing the same
problem with compacting. My friend doesn't experience the problem and I
think he suspects I'm hitting the bottle too hard or something. I think your
observation is worth investigating for my problem and if there is a link, then
maybe this is an issue that deserves documentation.

I'll play with it and get back to you if I figure anything out that might help both
of our problems.
 
D

Danny J. Lesandrini

Ok, a friend of mine found and solved my issue. I was using his MDA addin file and it
was causing Access to crash when I performed a compact. Here's what he found that
would relieve the problem:

Try this:

* Open your app
* Open the VBA IDE with an ALT+F11
* I’m hoping you have one or more open code windows
* Make sure your app is not compiled
* Now close all open Windows
* Compile the app
* Do a File>Save Compact or CTL+S
* This should save all the code windows in a close state
* You can test this by closing the app then reopening it. It should not open any code windows.
* If you close Access, make sure you open the VBA IDE with an ALT+F11
* Close the VBA IDE
* Now try the Compact
 
G

Guest

Nope. Didn't work. I tried the procedure on both the Db and the library
mda. Eventhought the code windows are now all closed, I can see that the
..mda is still selected by default.

Here is some more info that I found... I have this problem on dbs that have
their own modules along with the library mda as a reference. But, I do not
have the problem on any db that only have the mda referenced and no
additional modules.

Still, the only work around that I found was to password protect the vba code.
 

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