• When ‘Stop’ doesn’t break code…

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » When ‘Stop’ doesn’t break code…

    Author
    Topic
    #463016

    I’m trying to debug some code on a command button and ‘stop’ isn’t forcing a break. Is there some special feature that will prevent ‘stop’ from breaking code execution in certain instances? (my message boxes aren’t stopping the code either)
    Each Call statement takes around 30 seconds to run- would that have anything to do with it?
    I’m lost.

    I have:

    (lots of code)
    .
    .
    Call FYMedian(“GPECR”)
    Call FYPR(“GPECR”)

    MsgBox (“what?”)
    Stop
    MsgBox (“what?”)

    DoCmd.RunSQL “Delete TImmun.* From TImmun”
    DoCmd.RunSQL “INSERT INTO TImmun ( ImmunDate, Immun, Country )” & _
    .
    .
    (lots of code)

    Of course, I tried it first without the ‘what’ message boxes, which don’t work either.

    Viewing 2 reply threads
    Author
    Replies
    • #1180370

      It wasn’t clear, even though the code doesn’t stop, are your message boxes displaying?

    • #1180383

      I just found my mistake- everything is fine.

      (I missed a branch in the code above this section, which was diverting control to another module, so this code was never being run.)

      Feel free to delete this entire posting (I feel like an idiot…)

      • #1180426

        I just found my mistake- everything is fine.

        (I missed a branch in the code above this section, which was diverting control to another module, so this code was never being run.)

        Feel free to delete this entire posting (I feel like an idiot…)

        Easily done mate, we have all done that at some time or other.

    • #1180478

      Some of us more often than we’d care to admit.

    Viewing 2 reply threads
    Reply To: When ‘Stop’ doesn’t break code…

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

    Your information: