Disaster recovery! All forms disappeared

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IT Couple
    New Member
    • May 2009
    • 36

    #1

    Disaster recovery! All forms disappeared

    Hi

    I was working on MS Access 2003 and clicked save in visual basic I got some error message which I ignored and all the forms have been removed. I restarted and they appeared. After a while it happened again but they didin't appear again. (there are still in VB)

    I have done a few changes remotely and the database was not being backed up (only BE was backed up).

    I've read on the internet that this happens and found one post where someone says that he/she paid a company to do that. (the db is still big so the forms must be there, the same experienced other people)

    Any ideas?
    I have the file after the forms were removed. (untouched)

    Many thanks in advance.
    Emil
  • Denburt
    Recognized Expert Top Contributor
    • Mar 2007
    • 1356

    #2
    Lots of things can be going on. First you said you have not backed this up so do so now... I usually back mine up before I start working on it then hourly if not more often and once I have completed working on it I back it up again. I probably back it up way more often than necessary but better to have a backup then not.
    Make sure that the database is compiled, then if you haven't try compact and repair database. then you could always try the following:
    SaveAsText(acFo rm,"FormName"," FileName")
    LoadFromText(ac Form,"FormName" ,"FileName")

    Hopefully one of these methods will bring them back if not you can try to decompile the database and see if that helps.

    Comment

    • IT Couple
      New Member
      • May 2009
      • 36

      #3
      Hi Thanks for the prompt answer.

      The file I was working on was used but was a development copy (now replaced by previous version).

      I have tried to compile it but I'm getting message boxes saying that the form is misspelled or refers to a form that doesn't exist.

      I'm able to export the form in VB but I cannot import it and I also cannot remove a form from VB manually the option is grayed out.

      I also tried compact and repair but didn't work.

      I think I will just have to make the changes again only about 5-10h and now I know the answers so should be quicker. However I'm very curious if there is a way to do that so I will keep the file and maybe one day I will find out ;) or someone will share his experience with this fatal bug!

      Regards
      Emil

      Comment

      • Denburt
        Recognized Expert Top Contributor
        • Mar 2007
        • 1356

        #4
        Originally posted by IT Couple
        Hi Thanks for the prompt answer.

        The file I was working on was used but was a development copy (now replaced by previous version).

        I have tried to compile it but I'm getting message boxes saying that the form is misspelled or refers to a form that doesn't exist.

        I'm able to export the form in VB but I cannot import it and I also cannot remove a form from VB manually the option is grayed out.

        I also tried compact and repair but didn't work.

        I think I will just have to make the changes again only about 5-10h and now I know the answers so should be quicker. However I'm very curious if there is a way to do that so I will keep the file and maybe one day I will find out ;) or someone will share his experience with this fatal bug!

        Regards
        Emil
        MS Access has many fatal bugs. I have 1 report in particular that I work on quite frequently and it bombs out quite frequently so I pull in a back up and off I go. Not to much you can do sometimes.

        You say you can export it but not import it. Is that using the commands I used in my previous post or are you doing it some other way? When you try to import it what happens do you get an error or anything?

        Many times when things like this happens it is really hit or miss to see what will work to get things back in order. You might also try the decompile option as I mentioned above.

        msaccess.exe "drive\path\fil e name.mdb" /decompile

        Let us know if one of these methods works or if you find an alternate method that resolves it for you.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32669

          #5
          Sometimes you can import the form into another database. This doesn't help much when the form itself is corrupted, but is worth knowing.

          Otherwise, I would always recommend the following (as posted previously) :
          Originally posted by NeoPa
          It is always a good idea to ensure that variable name checking is enabled, AND your code compiles (at least compilation has been attempted), before submitting a question.

          This avoids asking questions which are much more easily resolved on your own PC than on a forum.

          To ensure variable name checking is enabled for all new modules, go to - Tools / Options / Editor (from the VBA Editor window) and set Require Variable Declaration to True (checked). For existing modules, ensure that the Option lines at the very top include :
          Code:
          Option Explicit
          To compile your project, select (again from the VBA Editor window) Debug / Compile Project Name.

          We ARE generally happy to help with compilation problems too (If you find an error reported and you can't resolve it, let us know), but we do expect members to have tried compiling before submitting a question. That way we have a better idea of the sort of problem we're looking at.
          Not all is relevant to your situation, but the compilation bit is certainly so.

          Otherwise, the advice to backup regularly is your safety-net for the future.

          Comment

          • IT Couple
            New Member
            • May 2009
            • 36

            #6
            Hi

            For this project I will just let it go as it was developed by another developer and it will just be easier for me to do my bits again ;)

            I've tried compiling the project in vb but it says the form is missing, I will play with at when I have a minute and see if anything else which was mentioend here works.

            Many thanks for all the replies!
            Emil

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32669

              #7
              No worries. I recommend compiling frequently, to find and fix problems as soon as they occur.

              Comment

              Working...