• Module not found

    Author
    Topic
    #460472

    After blindly following HansV’s vba code, all my macros are no longer available.
    I receive Module not found error message. Please help. Thanks.
    Armstrong

    Viewing 2 reply threads
    Author
    Replies
    • #1164624

      When clicking the macro object, I receive the following error message. Please help Thanks.
      Armstrong

      • #1164626

        In fact, all my macros fail for all Access database files. Please help.
        Armstrong

    • #1164627

      Not being an Access expert, but quite ok with VBA, can you enlighten me with what code you blindingly followed to introduce this problem ?

      • #1164628

        Hi Claude,
        Thanks for being kind enough to help.
        The VBA code was supplied by HansV (http://www.wopr.com/index.php?showtopic=764062) as follows:
        Me.OrderBy = “LastName”
        Me.OrderByOn = True

        Nonetheless, after I recompiled the database in question, all macros are restored.
        Hope this will help others.
        Armstrong

        • #1164685

          Nonetheless, after I recompiled the database in question, all macros are restored.
          Hope this will help others.
          Armstrong

          Thanks for letting us know Armstrong!

          • #1164782

            Whenever I start (reload) the database and click a button which initiates a macro, it always pops up the “Module not found” error. How to resolve it?
            Armstrong

            • #1164784

              We’d have to see a stripped down and zipped copy of the database, otherwise I don’t think it’s possible to know what causes this.

    • #1164795

      Possibly the security settings are disabling your VBA code – what version of Access is this?

      • #1164799

        Possibly the security settings are disabling your VBA code – what version of Access is this?

        Hi Steve,
        Thanks for your help. It’s Access 2007.
        Armstrong

        • #1164802

          In the Property Sheet, under Event tab, for an event, I click the builder button and the Choose Builder dialog box shows up. When I choose Code Builder, the Access always crashes.
          Please help. Thanks.
          Armstrong

          • #1164805

            When I choose Code Builder, the Access always crashes.

            Doe this happen in all Access databases, or only in one specific database?

            • #1164816

              Doe this happen in all Access databases, or only in one specific database?

              Only one database, which I blindly added your VBA code.
              Armstrong

            • #1164820

              Try creating a new database, and import the database objects from the problem database into it.

            • #1164866

              Try creating a new database, and import the database objects from the problem database into it.

              Thanks for your help. Following your advice, during the import, the “Module not found” error message pops up. Indeed, that’s exactly form I blindly entered your VBA code. Forgive my ignorance, not sure why the form has anything to do with module, which I suppose to mean any VBA code. What should I do next?
              Thanks.
              Armstrong

            • #1164868

              Forms and reports may contain a code module.

              I’m wondering whether the fact that the name of your form contains Chinese characters causes the problem. Access itself can handle that, but VBA doesn’t support Unicode characters, as far as I know.
              You could try giving the form a name that uses only western characters.

            • #1164875

              Forms and reports may contain a code module.

              I’m wondering whether the fact that the name of your form contains Chinese characters causes the problem. Access itself can handle that, but VBA doesn’t support Unicode characters, as far as I know.
              You could try giving the form a name that uses only western characters.

              HansV,
              I’m sorry I forget to mention. My form in question doesn’t have and doesn’t want any VBA code. How can I properly remove the “module”?
              Thanks.
              Armstrong

            • #1164877

              When importing, I received a lot of error messages:

            • #1164878

              Can I delete Form_frmTransaction?
              How can I delete frmTransacton?
              Armstrong

            • #1164882

              Now I discover a definitive but simple solution to solve all heart-stopping issues posted above. Go to the Property Sheet, select Other tab. Set Has Module property to ‘No’. You must run Compact & Repair Database.

              That’s it. One thing for sure: the issue has nothing to do with Asian language.
              Thank you.
              Armstrong

            • #1164885

              I still think the problem *did* have to do with the Chinese characters in the name of the form. As I mentioned, VBA doesn’t support non-western characters. As long as the Has Module property of the form was set to Yes, the form had a VBA code module, and because the form name was not valid in VBA, this caused conflicts.

            • #1164892

              I still think the problem *did* have to do with the Chinese characters in the name of the form. As I mentioned, VBA doesn’t support non-western characters. As long as the Has Module property of the form was set to Yes, the form had a VBA code module, and because the form name was not valid in VBA, this caused conflicts.

              HansV,
              I’ll test your interesting theory but, with due respect, I doubt it especially for Access 2007. I’ll show you VBA code written in Chinese soon.
              Armstrong

            • #1164893

              The screenshot of VB Editor (ctrl+g) shows VBA’s support of Asian language.
              Armstrong

            • #1164898

              Well, in that case I don’t know what went wrong.

            • #1164910

              Well, in that case I don’t know what went wrong.

              HansV,
              Don’t worry too much. For some odd reason, after I deleted the VBA code supplied by you, Access still thought the form has a module attached. That’s exactly the cause of all the troubles.
              Armstrong

            • #1164911

              Deleting all code in a module will not remove the module itself. Setting the Has Module property of a form or report to No does remove the module (whether it contained code or not).

            • #1164867

              Try creating a new database, and import the database objects from the problem database into it.

              The online help offers the following help, which I can’t make any sense out of it.
              I did delete something like VBA. Perhaps I have deleted something important part of the project. How could I restore it? Please help. thanks.

              Module not found Modules aren’t loaded from a code reference — they must be part of the project. This error has the following cause and solution:

                [*]The requested module doesn’t exist in the specified project. For example, the statement MyModule.SomeVar = 5generates this error when MyModuleisn’t visible in the project MyProject

              Regards,
              Armstrong

    Viewing 2 reply threads
    Reply To: Module not found

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: