Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Closing a message box (2003 sp2)

    Typically a message box is closed by the user clicking an OK or YES button. Is there a way to close it automatically after a few seconds?
    Thanks
    chuck

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

    Re: Closing a message box (2003 sp2)

    No, for all code execution pauses until the user clicks a button. Don't use a message box but create a small form instead. Place one or more labels on the form to show the message you want to convey.

    Set its Timer Interval property (in the Event tab of the Properties window) to the number of milliseconds you want the form to be displayed, for example 5000 if you want the form to be visible for 5 seconds.

    Use the On Timer event of the form to close it (DoCmd.Close).

    Open the form using DoCmd.OpenForm, setting the WindowMode argument to acDialog.

Posting Permissions

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