Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Oct 2001
    Location
    Newport, Gwent, Wales
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA Editor problems (Access 2k Win 2k)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA Editor problems (Access 2k Win 2k)

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

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

  3. #3
    3 Star Lounger
    Join Date
    Oct 2001
    Location
    Newport, Gwent, Wales
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA Editor problems (Access 2k Win 2k)

    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 [img]/forums/images/smilies/biggrin.gif[/img]

    Ian

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA Editor problems (Access 2k Win 2k)

    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>post 396578</post#> for instructions.

  5. #5
    3 Star Lounger
    Join Date
    Oct 2001
    Location
    Newport, Gwent, Wales
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA Editor problems (Access 2k Win 2k)

    Hans

    Thanks, this worked, any idea why it worked?

    Ian

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA Editor problems (Access 2k Win 2k)

    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...

Posting Permissions

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