Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send a keystroke to a message box 2

Status
Not open for further replies.

mike777

Programmer
Jun 3, 2000
387
US
This is a tough one. For me, anyway.
I want to display a message to a user for, say, three seconds, and then the message should terminate itself.
If I use the MsgBox, the message box suspends the code until the user clicks "OK".
How can I call a MsgBox, have it sit there for three seconds and then close itself?
I got the three second thing down. I use Timer and Do Until...that's no problem.
There's also InputBox..is there something that just sends a message and doesn't require a response? Or is there a way to sent a keystroke to the message box after the designated time period (I think no, since the message box suspends the code). Hmmm...I'm stuck.
Can you help? Thanks!
 
Create a custom form with your message instead of using a msgbox. Have the form open as acDialog, this will keep the user from doing anything until the form has closed. Use this form's On timer event to close the form by setting the Timer Interval to 3000 (3 seconds):

Private Sub Form_Timer()
DoCmd.Close acForm, Me.Name
End Sub

HTH s-)
RDH
Ricky Hicks
rdhicks@mindspring.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top