I have a home movies database and a form that allows the user to add actors (for assigning them to movies) by entering the star name into a text box. But without a pop up message, there's no visual confirmation that the data was written to the database.
I'd like to add an OnKeyPress event (or OnKeyDown or etc...) that pops up a message like "Data successfully added to database" when the user presses the TAB button. How would you do this?
I tried this just as a test and it worked great:
then I tried substituting the word "Escape" with "Tab" but got errors...
Help?
I'd like to add an OnKeyPress event (or OnKeyDown or etc...) that pops up a message like "Data successfully added to database" when the user presses the TAB button. How would you do this?
I tried this just as a test and it worked great:
Code:
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyEscape Then
MsgBox "ESC pressed."
End If
End Sub
then I tried substituting the word "Escape" with "Tab" but got errors...
Help?