Compile with VBA

G

Guest

I've designed an updating application to deliver object updates to clients
using my databases. The application gets launched it does the following:

Verifies file locations
Verifies version numbers
Backs up client master / back end containers
Pushes modified objects to client master
Modifies tables in backend
Launches action queries if necessary.

The only thing I'm having trouble doing is compiling the modules in the
client master. When you add new modules / forms / etc. it leaves the DB in an
uncompiled state. I've got a routine in the open event of the main form that
checks for the iscompiled flag.

If currentdb.iscompiled = false
runcommand accmdcompileallmodules
endif

Unfortunately, this is causing problems on some machines....

Does anyone know a way to force a compile on a remote DB and set compile
options for 2K?

Thanks in advance.

bnielsen
 
D

Damiaan

Not a real solution. But can't you use MDE 's instead of mdb's? These are
always compiled.
 
S

Steven Trencher via AccessMonster.com

The undocumented function (though acknowledge by Microsoft and noted in
technotes on their website) to recompile the current DB is:

Call SysCmd(504, 16483)

Then you must run Application.IsCompiled to see if it was successful.

Since this is only for the current DB, perhaps there is a way to open the
remote DB and call a function there that recompiles its VBA code. Also, I
believe there is another SysCmd function that creates an MDE if desired.
 

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