UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> Recover Corrupt or Broken Database Objects    
Recover Corrupt or Broken Database Objects

This page is a stub. Please help us by expanding or merging it with applicable content

This uses a hidden undocumented feature of access.
What it does it send the object to a text file. When you bring the object back in it often fixes corruption.
It also removes from the count of controls in a form or report that have been deleted.

This fix is not guaranteed to help but has worked very well for some individuals.
Use this for all forms, queries, reports, modules in the problematic database.

In the immediate window type this code, replace Objectname with the objects actual name:

application.saveastext acForm,"Objectname","C:\Windows\Desktop\Objectname.txt"

then use this code to bring the object back in:

application.loadfromtext acForm,"Objectname","C:\Windows\Desktop\Objectname.txt"

acForm must be changed to acQuery, acReport, or acModule to correspond with the object type you are sending to text.
The location can be anywhere, however desktop is suggested because the file can be deleted quickly once you have brought it back into access rather than having to open windows explorer.

This page was originally ported from the UtterAccess Forums. It is based heavily or in part on a post by khaos.
Saving corrupt or broken database objects

Edit Discussion
Custom Search

Thank you for your support!
This page has been accessed 5,463 times.  This page was last modified 16:56, 11 February 2012 by Jack Leach. Contributions by Cpetermann  Disclaimers