• Automation Code Interruption (Access 2002 SP-2)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Automation Code Interruption (Access 2002 SP-2)

    Author
    Topic
    #392025

    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.

    Viewing 0 reply threads
    Author
    Replies
    • #702303

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

      • #702388

        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?

        • #702389

          Yes, code does get recompiled when there is a change. Perhaps it just needed to be jogged a bit grin

    Viewing 0 reply threads
    Reply To: Automation Code Interruption (Access 2002 SP-2)

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

    Your information: