Form1 misspelled or missing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JustJim
    Recognized Expert Contributor
    • May 2007
    • 407

    Form1 misspelled or missing

    Somebody (possibly me, but I'm not admitting to it!) apparently started to design a new form and then changed their mind. It got saved to the generic name Form1. I deleted it (via the Database Window) but now when I'm in VBA I can still see Form_Form1 in Project Explorer but it has no code associated with it.

    I now get heaps of instances of the same error message telling me that the form is misspelled or missing.

    I'm also getting "Module not found" error messages when opening other forms!

    Any pointers on how I can remove any references to this Fantom Phorm? It's not vital because I'm working on a copy of the application and can just import the new forms I've written into the "real" version. The real version still has the mysterious Form1, but there it causes no problems!

    Thanks in advance guys

    Jim
    Last edited by JustJim; Aug 29 '07, 12:21 AM. Reason: Spelling
  • Scott Price
    Recognized Expert Top Contributor
    • Jul 2007
    • 1384

    #2
    Assuming you have already tried a Compact Repair without any results, try the decompile method mentioned here: http://allenbrowne.com/ser-47.html . (Actually might be a good idea to read the whole page before trying anything :-)

    Sounds like your database has gotten confused in one of the many levels of compile/decompile. Hopefully that Gormless Fantom Phorm will disappear.

    Regards,
    Scott

    Comment

    • JustJim
      Recognized Expert Contributor
      • May 2007
      • 407

      #3
      Originally posted by Scott Price
      Assuming you have already tried a Compact Repair without any results, try the decompile method mentioned here: http://allenbrowne.com/ser-47.html . (Actually might be a good idea to read the whole page before trying anything :-)

      Sounds like your database has gotten confused in one of the many levels of compile/decompile. Hopefully that Gormless Fantom Phorm will disappear.

      Regards,
      Scott
      Thank you Scott. I've glanced at the link and I'll take your advice and read it through. Looks very helpful though.

      Jim

      Comment

      • JustJim
        Recognized Expert Contributor
        • May 2007
        • 407

        #4
        Scott,

        Take a pat on the back out of petty cash! Thank you. That Allen Browne link is now printed and in my briefcase, saved on my USB key and in my browser favourites. Very handy stuff.

        Jim

        Comment

        • Scott Price
          Recognized Expert Top Contributor
          • Jul 2007
          • 1384

          #5
          Thanks Jim! Glad you liked it... Allen's site is one of my favorites.

          Just wondering, though... Did the decompile do the trick, or was there another tip there that helped out?

          Regards,
          Scott

          Comment

          • JustJim
            Recognized Expert Contributor
            • May 2007
            • 407

            #6
            Originally posted by Scott Price
            Thanks Jim! Glad you liked it... Allen's site is one of my favorites.

            Just wondering, though... Did the decompile do the trick, or was there another tip there that helped out?

            Regards,
            Scott
            I actually only got as far as the "Symptom: Cannot open a form or report" solution which imports stuff into a new blank database. Since my Fantom Phorm was not showing in the Database Window (only in Project Explorer in VBA) I just clicked the all tabs and Select All'd and Hey, Presto!

            Jim

            Comment

            • JustJim
              Recognized Expert Contributor
              • May 2007
              • 407

              #7
              Well actually now that I've had a further play, that wasn't ideal because even though I ticked the box to import relationships.. . no relationships. I could re-define them but I'm going to go ahead and try the de-compile trick just for "fun"!

              Will let you know.

              Jim

              Comment

              • JustJim
                Recognized Expert Contributor
                • May 2007
                • 407

                #8
                No, de-compiling didn't help either. I have simply imported the forms I was designing into the "real" version of the application. The dreaded Form1 exists there but it is reflected in the Database window as well as in Project Explorer so it doesn't appear to cause any problems!

                Another one to revisit another time.

                Jim

                Comment

                • Scott Price
                  Recognized Expert Top Contributor
                  • Jul 2007
                  • 1384

                  #9
                  Originally posted by JustJim
                  No, de-compiling didn't help either. I have simply imported the forms I was designing into the "real" version of the application. The dreaded Form1 exists there but it is reflected in the Database window as well as in Project Explorer so it doesn't appear to cause any problems!

                  Another one to revisit another time.

                  Jim

                  Hmmmm... I wonder if you first went in and deleted the form's module, then later deleted the form itself? This smells like a corruption problem to me, just trying to finesse around it may not work in the long run...

                  I wonder if anyone else has any other ideas, or has run into this before?

                  Regards,
                  Scott

                  Comment

                  • MMcCarthy
                    Recognized Expert MVP
                    • Aug 2006
                    • 14387

                    #10
                    Jim

                    I can't remember which version of Access you use but I know there are problems with form modules in Access 2000 which can be fixed by applying one of the three office updates. Not sure which one but its a good idea to apply all three.

                    I've only ever seen this kind of corruption in Access 2000. However, if it is this problem, which usually manifests the other way around in that the form exists and you can see the form on the project list but cannot access the code, I don't think its resolveable. You just have to start again.

                    Mary

                    Comment

                    • JustJim
                      Recognized Expert Contributor
                      • May 2007
                      • 407

                      #11
                      Originally posted by mmccarthy
                      Jim

                      I can't remember which version of Access you use <snip> However, if it is this problem, which usually manifests the other way around in that the form exists and you can see the form on the project list but cannot access the code, I don't think its resolveable. You just have to start again.

                      Mary
                      Oooh You're full of fun and good news today, Mary! I've got a week left on this assignment then they can call me back on call-out fees! There are valueable reasons for not writing bug-free code, you know!

                      Only joshin' (well a little bit)

                      Jim

                      Comment

                      • NeoPa
                        Recognized Expert Moderator MVP
                        • Oct 2006
                        • 32661

                        #12
                        Originally posted by JustJim
                        Oooh You're full of fun and good news today, Mary! I've got a week left on this assignment then they can call me back on call-out fees! There are valueable reasons for not writing bug-free code, you know!

                        Only joshin' (well a little bit)

                        Jim
                        Far too cynical Jim ;)
                        Just to chip in and say that I too have come across this problem using Access 2K. I had to rebuild or restore from backup when I found the problem. I have all SPs applied so, while that is always very good advice, it may not completely resolve the problem.
                        To test my DBs for corruption I will close all code windows and do a compile. If the DB is healthy it will work. If not it will hang part way through. I try to do this regularly so that I have to repeat as little work as possible. The new code is easily applied to an old copy as it is copy/pastable still. New (possibly dodgy) objects will need to be recreated.

                        I hope this helps.

                        Comment

                        • Denburt
                          Recognized Expert Top Contributor
                          • Mar 2007
                          • 1356

                          #13
                          Interesting thread, although I have not witnessed this particular issue I would suggest checking the collections using vba. if you can see it using vba cycling through the forms or module collections try to delete it that way...

                          i would also like to say that Neo has some very interesting points.

                          Comment

                          • Scott Price
                            Recognized Expert Top Contributor
                            • Jul 2007
                            • 1384

                            #14
                            Thanks Mary and NeoPa for taking a look and your help!

                            Just curious, Jim, do you have the Name AutoCorrect feature enabled? There seems to be an inordinate number of bugs with this feature, and just wondering if you're running into some problems with it...

                            Allen Browne (again): http://allenbrowne.com/bug-03.html

                            Regards,
                            Scott

                            Comment

                            • Denburt
                              Recognized Expert Top Contributor
                              • Mar 2007
                              • 1356

                              #15
                              Originally posted by mmccarthy
                              I've only ever seen this kind of corruption in Access 2000. However, if it is this problem, which usually manifests the other way around in that the form exists and you can see the form on the project list but cannot access the code, I don't think its resolveable. You just have to start again.

                              Mary

                              Mary an existing form becoming corrupted has PLAGUED me for years and I just found out that you can usually still export the corrupted form as text using VBA then reimport it the same way and off you go. Worked like a champ. I have this issue ALL the time, I think it is because of the size of my front end databases.

                              Comment

                              Working...