Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Bay Area, California, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Control a system modal MsgBox (2000 SR-1)

    I have two timed events on the same form: one uses the form's timer event, one uses a timed loop.

    One event opens a system-modal Msgbox ('Retry' or 'Cancel'). While this msgbox is active, the other timed event =may= occur before a user responds to the Msgbox.

    I want the second timed event to close ('Cancel') the Msgbox, if it is open, before it proceeds.

    I tried Sendkeys "{Esc}", which doesn't work (manually pressing "Esc" works, though).

    Any idea how I can programatically operate the MsgBox?

    Much obliged.

  2. #2
    Star Lounger
    Join Date
    Nov 2001
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Control a system modal MsgBox (2000 SR-1)

    Instead of using a Msgbox create a form that resembles the Msgbox and then have your timed event close the form.

    hth,
    Jack

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Bay Area, California, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Control a system modal MsgBox (2000 SR-1)

    Jack,
    thanks for replying. Your solution was my first thought, as well. But unlike a msgbox, which would pause execution until the user responds (synchronous), the code would continue past the docmd.openform command asynchronously.

    I did come up with a workaround which I won't describe here, since it is specific to my particular project. It would take too long to explain the circumstances, and the chances anyone else would benefit are slim.

    Nonetheless, if there is a way to communicate with a MsgBox, I would still like to know.

    Thanks again,

    Klaus

Posting Permissions

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