Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Join Date
    May 2007
    Posts
    27

    Unanswered: Help wanted. My forms disappeared...

    Hi,

    I am very puzzled, and quite angry with access at this point. I have a database in access 2003. I have 2 forms in there. Each form also has some VBA code linked to it.

    This morning, I used both forms, no problem.
    This afternoon, both forms, and even their VBA code are GONE.

    I tried compact/repair, and this didn't work. I tried creating a new database, and importing from the corrupt one, but the import does not show any forms either.

    What else can I try??? My sincere thanks for any suggestions. If this could help, I can email the database (it is rather small).

  2. #2
    Join Date
    May 2007
    Posts
    27
    Update on my post above.

    Interesting things are happening. No solutions, but maybe there is hope. When I open the database, Access tells me that there are potential unsafe expressions in the database. This - I hope - points to the fact that my VBA code (and my forms) are somewhere hidden in the database.

    However, I am at my wits' end. I have tried about everything that I can think off, have tried using some VBA code to "undelete" tables and queries, and tried to change it to undelete forms. I have hit a wall. I don't know anymore where to look.

    I have attached the database in question to this post. If somebody feels brave, and is up to a challenge, then I would be *extremely* grateful if you could have a look and see what could be done.

    Thank you for your time. I appreciate it.
    Attached Files Attached Files

  3. #3
    Join Date
    May 2007
    Posts
    27
    Actually, the zipfile in my post above is the one where I ran "compact and repair". The zipfile in this post has not had this operation done yet.

    Thanks for any help anybody could give.
    Attached Files Attached Files

  4. #4
    Join Date
    May 2007
    Posts
    27
    Actually, the zipfile in my post above is the one where I ran "compact and repair". The zipfile in this post has not had this operation done yet.

    Thanks for any help anybody could give.

    (sorry for double post)

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Sorry, all I can suggest is to restore the file from your most recent backup.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Long shot...

    Tools > Options > View > Hidden Objects
    George
    Home | Blog

  7. #7
    Join Date
    May 2007
    Posts
    27
    Unfortunately, it is not a hidden object. Thanks for the suggestion though.

    I dont' get it. I looked into the mdb file with a hex editor, and I can see snippets of my VBA code.

    I also deleted everything in the file (tables, queries) and compact and repaired the file, and it is still 1.5MB in size, so something is still in there (my forms), but I can't see them.

    The VERY strange thing is that my backup file has the exact same behaviour despite the fact (I double checked the backup logs) that it has not been overwritten with a copy of my "operational" file.

    Any suggestions? Can anybody try and download the file, and see if you can see the forms? I start to believe that it is a local problem at work, despite the fact that I tried opening the database on different machines already.

    If - by the grace of whatever power - you can open the forms, it would be great if you could email me the vba code. That is really the only thing I am after.

    Thanks for your help.

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    failing a decompile and or compact & repair theres not a lot you can do

    Id want to make sure there were no compilation errors in the application.. sometimes that can cause odd problems.

    I've had a problem like this before, but given that I was on a tight deadline the only resolution I could use was to re-write the changes that couldn't be recovered from the backup.

  9. #9
    Join Date
    May 2007
    Posts
    27
    Well, I thought I would give everybody an update.

    I failed miserable to recover the forms, so I decided to see if I could find somebody to repair the database for me. A quick google let me to a company that does exactly that. I uploaded my database, got a recover report back that at least reported the correct names of my missing forms. I then paid the recovery fee ($60) and downloaded a perfectly corrected database.

    It bugs me to no end that everything was in the database, but I could not get to it. All is well that ends well. I am happy but still a little frustrated ;-)

  10. #10
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I'd love to know how the forms and VBA code were recovered. I downloaded your file and couldn't see them either.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  11. #11
    Join Date
    May 2007
    Posts
    27
    I wish I could figure it out as well.

    There are vba routines out there undeleting queries and tables using queryDef and tableDef.

    Is there something similar (a collection) for forms? I searched, but couldn't find anything.

  12. #12
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Yes, there are collections of all objects. But the database container shows those collections... or so I thought.

    If I can find the time to play around with it, I'll check it out in more detail.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  13. #13
    Join Date
    May 2007
    Posts
    27
    Hi Startrekker,

    It would be great if you could have a look as well. I will continue to look into the database, just out of curiosity. Now that we know that the forms (and the VBA) are in there and are recoverable, it would be a nice exercise to figure out how to recover from this error, if just for the academic boasting capability of it.

    Just for confirmation though: my database is restored, so this is definitely not a pressing issue anymore, so don't waste too much time on it.

    If I find how to restore them, I will post my methodology here.

  14. #14
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    If I find how to restore them, I will post my methodology here.
    As will I
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  15. #15
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    One thing I've experienced where the forms/code seems to dissappear was when I had 2 versions of MSAccess on the same computer. I imported form(s) into another mdb (regardless of version) and then started coding (without compiling) and whola - corrupted and could not see the form(s)/code. IF you have more than 1 Access version on your computer, make sure if you do any importing of objects (forms, reports, modules) from one mdb into another (regardless of version) that you IMMEDIATELY compile after importing. I'm not sure if this is related to your problem or not but it's something to keep in mind if you have 2 versions of Access. I had to utilize the /decompile option to fix. Doing this on your mdb though did not show any forms either.
    Last edited by pkstormy; 01-13-08 at 13:38.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •