Importing Code from one DB to a second using Access 2000

D

DB

I have an Access 2000 DB. On occasion, if I'm sloppy, it exceedes the
maximum files size. Not a big deal. Create a new DB, import all the
objects. 10 minutes later I'm up and running.

Except for the VB modules. It appears that instead of importing the VB code
it links it in some way. When I delete or move the over-sized version of the
DB none of the code works.

I've spent hours looking for a setting which will actually import the code
instead of linking. Can this be done?

Thanks.
 
A

Allen Browne

Try decompiling the database.

Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

Then compact the database:
Tools | Database Utilities | Compact


If that doesn't do the job, you could export the Text of the module with:
SaveAsText acModule, "Module1", "C:\Module1.txt"
and then import with LoadFromText. Could be done in a loop.
 

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