• VBA Editor problems (Access 2k Win 2k)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » VBA Editor problems (Access 2k Win 2k)

    Author
    Topic
    #408476

    Hello again

    I’ve got a rather odd problem with some code I’ve got attached to a button. When the button is clicked nothing appears to happen…. The code is attached to the on click event and is named correctly, I’ve put some break points in the code, but they don’t seem to be having any effect, i’ve tried replacing my break points with ‘Stop’, again nothing happens.

    As the code is automating Word I checked the task manager and it is starting a new instance of word in the background, despite there being three break points set before the code sets objWord equal to anything…..

    Has anyone got any experience of this sort of wierdness??

    Thanks

    Ian

    Viewing 1 reply thread
    Author
    Replies
    • #862784

      See if the problem goes away if you decompile, then compile the code in the database, then compact the database.

      See post 44865 (and other posts in the same thread) for instructions on decompiling a database.
      After decompiling, activate the Visual Basic Editor and select Debug | Compile .
      Then, switch to Access and select Tools | Database Utilities | Compact and Repair Database.

      • #862798

        Hans

        Thanks for the advice, tried it and there is no change to the result I’m getting.

        If nothing else I would expect a couple of error messages from some where, especially as I’ve now tried to force this by allowing null values to be used as inputs to the bookmarks in Word.

        I’ve also tried replacing the form with a duplicate created from scratch as I’d seen that as a ‘solution’ for other odd VBA problems, same result from both forms, even after the decompile, recompile and compact and repair…

        At least I now know how to decompile a project though, live and learn

        Ian

        • #862800

          One other thing to try is to import all database objects into a new blank database.

          If you like, you can post a stripped down copy of the database. See post 396578 for instructions.

          • #862872

            Hans

            Thanks, this worked, any idea why it worked?

            Ian

            • #862877

              Access databases can become corrupted in various ways. In some cases, importing all database objects into a new database gets rid of the accumulated garbage. But it’s unpredictable – sometimes, decompile/compile helps, sometimes importing everything into a new database solves the problems, sometimes nothing helps…

            • #862878

              Access databases can become corrupted in various ways. In some cases, importing all database objects into a new database gets rid of the accumulated garbage. But it’s unpredictable – sometimes, decompile/compile helps, sometimes importing everything into a new database solves the problems, sometimes nothing helps…

          • #862873

            Hans

            Thanks, this worked, any idea why it worked?

            Ian

        • #862801

          One other thing to try is to import all database objects into a new blank database.

          If you like, you can post a stripped down copy of the database. See post 396578 for instructions.

      • #862799

        Hans

        Thanks for the advice, tried it and there is no change to the result I’m getting.

        If nothing else I would expect a couple of error messages from some where, especially as I’ve now tried to force this by allowing null values to be used as inputs to the bookmarks in Word.

        I’ve also tried replacing the form with a duplicate created from scratch as I’d seen that as a ‘solution’ for other odd VBA problems, same result from both forms, even after the decompile, recompile and compact and repair…

        At least I now know how to decompile a project though, live and learn

        Ian

    • #862785

      See if the problem goes away if you decompile, then compile the code in the database, then compact the database.

      See post 44865 (and other posts in the same thread) for instructions on decompiling a database.
      After decompiling, activate the Visual Basic Editor and select Debug | Compile .
      Then, switch to Access and select Tools | Database Utilities | Compact and Repair Database.

    Viewing 1 reply thread
    Reply To: Reply #862873 in VBA Editor problems (Access 2k Win 2k)

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

    Your information:




    Cancel