Results 1 to 14 of 14
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,095

    Recover a seemingly corrupted form

    I've managed to find myself with a seemingly corrupted form. I had just added a label control and added code to set the caption in the Open code. Something in that process apparently corrupted the form. I can't open the form either in View or Design. I tried to recover by creating a new DB and importing "everything" but I get the same error again, even during the import process.


    Click image for larger version. 

Name:	CorruptedForm.jpg 
Views:	20 
Size:	19.6 KB 
ID:	17873

    Anyone know how to recover from this?

    Thanks,
    Bill

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Can you post a copy of the db
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,180
    Hi,
    some things you can try:
    * if you still can open the database file, try to open the VBA window (ALT F11 or something like it) and then remove the code you added from the form. Then try to open the form again.
    * try compact and repair
    * remove the form from the database and import a copy from the last working back-up, then add the label again
    * look at the size of your database file: has it blown up to nearly 2 GIGA for some reason?

  4. #4
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,095
    App is in its infancy. Front-end and back-end MDB's plus a small token image file have been zipped. You'll need to un-zip into c:\CompList in order for the back-end table links to function properly. To trigger the 2004, simply double-click any one of the companies in the Record-Selection bar. In Debug, you will see the DoCmd.OpenForm that is attempting to open the offending form.

    There was a ton of work done upon the previous functioning copy of the form. Mostly moving controls around, adding a few, resizing a few, deleting a couple, etc.

    BillCompList.zip

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,095
    Thanks for the thoughts. I tried all of what you suggested before initial posting.
    Bill

  6. #6
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Sometimes this happens when you run a action query on a large table. I did not download your db.
    Try DeCompiling your db and then Debug your code.

    HTH

  7. #7
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,095
    Burrina, while I doubt that the problem is in the code, but rather with corrupted TB controls, I'm inclined to follow your suggestion. Funny, in all these years, I've never had an occasion to DE-compile.........how does one do that?

  8. #8
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Quote Originally Posted by GraeagleBill View Post
    Burrina, while I doubt that the problem is in the code, but rather with corrupted TB controls, I'm inclined to follow your suggestion. Funny, in all these years, I've never had an occasion to DE-compile.........how does one do that?
    The following link may help: http://www.fmsinc.com/microsoftacces.../decompile.asp
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  9. #9
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,095
    De-compile didn't clear up the issue. Sort of offers some evidence that the issue isn't code but rather corrupted controls.

  10. #10
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Here is an example:

    "C:\Program Files\Microsoft Office\Office\MSACESS.EXE" "C:\users\tim\documents\Mydatabase.mdb" /decompile
    HTH

  11. #11
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    @GraeagleBill

    I tried recovering your dB. No luck. Too many things are bad.

    1) The major thing that is corrupt is the Autoxec macro.

    2) The VBA project is also corrupt:
    * the code for the Report - even though there is no code
    * the code for the form "Record_Details"
    * code for the form "CompList" is a little corrupt - but will get worse.


    If you want:

    In the IDE, copy the code from the form "Record_Details" & save in a text file.
    Delete the Autoexec macro
    Delete the form "Record_Details"
    In the IDE, copy the code from the form "CompList" & save in a text file.
    Open each of the standard modules and copy the code, saving to text files.

    You have to copy - not export - the code because the VBA project is corrupt. If you just import them to a new databse, you will import the corruption also.

    Now that the code has been copied, open the form "CompList" in design view, open the properties dialog box, click on the OTHER tab and set the property "Has Module" to NO. Save and close.

    Create a new ACCDB. Set the options: Overlapping windows, un-check the autocorrupt settings, ensure the "Always use event procedures" is checked".

    Import the tables, queries and the form "CompList". Compact and Repair. Save

    Open the VBA IDE. Insert a Module. Rename the module and paste in the appropiate code. Compile the code and save.
    Continue until all of the standard modules are entered.

    Open the form "CompList" in design view. Add an event (say the OnOpen event) . In the IDE, delete the just added procedure and paste in the correct code from the text file. Compile the code. Close the IDE.
    Compact & repair from the main window.

    You will need to recreate the report and the form "Report_Details"... but you have the code.


    Marking the "Has module" keeps the corrupted VBA from transferring to the new dB.

    I learned this after 2 weeks of trying to recover from corruption.

    IMPORTANT: DO NOT edit code while code is executing!!! Compile and save often.

    3 rules of computing:
    1)Backup!
    2)Backup!
    3)Backup!


    (sorry about writing a book....)

  12. #12
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    I couldn't even get to the IDE for the Record Details form. But, on top of your other problems, when I ran the CompList form and Double-Clicked on it, it broke on the Form_DblClick event. I went into the code for this Form and it was highlighting this line:

    DoCmd.OpenForm frm, , , , , , "[LASTNAME]=""" & [LastName] & """" 'Yields an empty form

    From the syntax, I'm assuming that

    "[LASTNAME]=""" & [LastName] & """"

    is supposed to be the criteria for the WhereCondition. The problem, here, is that you have it placed in the position for the OpenArgs parameter. To be used in the WhereCondition it should be

    DoCmd.OpenForm frm, , , "[LASTNAME]=""" & [LastName] & """" 'Yields an empty form

    Linq ;0)>

  13. #13
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,095
    Long day, but the dust has settled. The big mistake was to have attempted to perform open-heart surgery on an old app in creating a substantially different app. I'll not waste your time elaborating. The corruption was so extensive that I had to essentially re-create the Record_Details form almost from scratch. And, while I doubt anyone will want to spend any more time on this, I'm posting another zip file with where I ended up. Thanks to all that gave their attention to this caper. Clearly, both Ssanfu and Missinglinq spotted the Remanents from the original app that were both troublesome and unwanted.
    Attached Files Attached Files

  14. #14
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Just glad that you got it working!

    Linq ;0)>

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Help with (seemingly) simple filter
    By TCWAptar in forum Programming
    Replies: 11
    Last Post: 08-11-2014, 11:21 AM
  2. Record Source is being Corrupted that drives Form
    By CementCarver in forum Forms
    Replies: 16
    Last Post: 08-01-2013, 01:10 PM
  3. How to recover lost MDB files passwords?
    By willkett in forum Access
    Replies: 14
    Last Post: 08-17-2012, 01:48 AM
  4. Serious Access Error, How to Recover?
    By bigroo in forum Access
    Replies: 4
    Last Post: 02-04-2012, 03:35 PM
  5. recover database
    By jgales in forum Access
    Replies: 1
    Last Post: 10-28-2011, 08:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums