MsgBox Arguments

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, group! Good morning!

I have a problem with my application. I have an On Keydown Event Procedure
in one of my forms. On keydown, there should be a message box that will
appear my syntax is:

MsgBox "Please give the program enough time to process your Time
transaction.",,"Time In/Out"

It works well but I want to eliminate the Ok button and want the message box
to disappear after say 5 seconds.

Any ideas or workaround on this? Please help and thank you very much.
 
Use the following code to display your message ...
There will be an OK button but it will close without user intervention in 5
seconds.

Dim oSHL As Object
On Error Resume Next
Err.Clear

Set oSHL = CreateObject("WScript.Shell")

If Err <> 0 Then
MsgBox "Error:" & Err
Else
oSHL.PopUp ""Please give the program enough time to process your Time
transaction.", 5, "Time In/Out", vbOKOnly
End If
 
Hi, Bob. Thanks for the prompt reply. It helped but one more thing. How to
code the On Timer event? I want the form to disappear after 5 seconds.
Thanks again.
 
For the form (Design View | properties | event):

1. the on timer event needs code to close the form (docmd.close)
2. the timer interval event needs to be set to 5000

That's it .

Bob Galway
www.bbg-enterprises.com
 
Hi, Bob! Thanks for the help. Anyway, I want to change the message of the
message box to
" Please wait . . . .!
The program is processing [EmployeeName] Transaction."

how will I capture the employee's name and display it on the message box?
Please help. Thank you very much!
 
Hi, Rick! Thanks for the help. Anyway, I want to change the message of the
message box to
" Please wait . . . .!
The program is processing [EmployeeName] Transaction."

how will I capture the employee's name and display it on the message box?
Please help. Thank you very much!
 
Back
Top