tags:

views:

31

answers:

1

I need to export all of the objects from my MDB to text files in a folder, and them import those text files as fresh Access objects into a brand new MDB, using some VBA code.

Does anyone have the source code for this? I know it exists out there somewhere, I just can't find it at the moment.

+3  A: 

Corrupt Objects within a Corrupt Microsoft Access MDB

The little documented SaveAsText and LoadFromText may help if an object is corrupted or otherwise behaving weirdly. At the debug/immediate window type: Application.SaveAsText acForm,"MyForm","c:\form.txt You can load the file into a new MDB. Application.LoadFromText acForm,"MyForm","c:\from.txt"

Sample code at http://www.datastrat.com/Code/DocDatabase.txt for saving all objects in an MDB.

Tony Toews