Help! VBA corrupt!

  • Thread starter Thread starter Sandra
  • Start date Start date
S

Sandra

Is there any hope? My latest backup doesn't have the
last hours worth of work I just put into this thing. It
won't compact & repair; can't open any objects, can't
import them into a clean file. Is there *anything* else
I can try?????
 
Sandra said:
Is there any hope? My latest backup doesn't have the
last hours worth of work I just put into this thing. It
won't compact & repair; can't open any objects, can't
import them into a clean file. Is there *anything* else
I can try?????

First, make a backup copy of the file as it is now, in case thrashing
about now makes things worse.

Next, can you decompile the project by running a command line like this:

msaccess.exe /decompile "C:\Your Path\YourDB.mdb"

(substituting the appropriate path and file name)? If so, does that fix
the corruption?

Failing that, can you open the Immediate Window? If so, can you execute
lines of code like these from the Immediate Window:

Application.SaveAsText acForm, "Form1", "C:\Temp\Form1.txt"
Application.SaveAsText acReport, "Report1", "C:\Temp\Report1.txt"
Application.SaveAsText acQuery, "Query1", "C:\Temp\Query1.txt"
Application.SaveAsText acModule, "Module1", "C:\Temp\Module1.txt"

(substituting your own object names and suitable file paths/names)? If
you can export the objects you've been working on since your last backup
to text, then you can go back to your last backup and load the objects
back from the text files using

Application.LoadFromText acForm, "Form1", "C:\Temp\Form1.txt"

and so on.
 
Back
Top