Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Automation Code Interruption (Access 2002 SP-2)

    I've written some VBA automation code to transfer information from Primavera Project Planner (project scheduling software) to Excel. I use Access as the "middleware" for intermediate tables and processing. Everything works fine except for part way through the process, execution stops and the VBA editor window appears with a line of code highlighted, as if there was a breakpoint there -- but there is no breakpoint there! No error messages appear, it just stops. I press F5 to resume execution and everything continues to completion. It's reproducible -- happens every time I run this routine. I've tried a Compact and Repair but that doesn't help.

    Has anyone else seen behavior similar to this? What could be causing it? Any way to fix it?

    By the way, I'm using Access 2002 but am retaining my mdb files in Access 2000 format (just in case that has something to do with it).

    Thanks in advance.

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

    Re: Automation Code Interruption (Access 2002 SP-2)

    Do you have error handling in the procedure/function with the fake break point? (I.e. On Error GoTo label)

  3. #3
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automation Code Interruption (Access 2002 SP-2)

    Hans,

    This routine did not have any error trapping. I added a simple On Error Goto Error_Trap and a trap routine at the end to MsgBox the Err.Number and Err.Description. I then ran the routine and it did NOT stop in midstream (no errors either). I took the error trap code back out (returning it to its former state) and ran it again. It still did not stop (even though the code was now identical to the way it was when it was stopping). Does the code get recompiled any time there's a change? If so, could the recompilation (after adding and removing the error trapping code) have fixed the problem?

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

    Re: Automation Code Interruption (Access 2002 SP-2)

    Yes, code does get recompiled when there is a change. Perhaps it just needed to be jogged a bit <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

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