Importing Code from one DB to a second using Access 2000

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
Back
Top