LeiDBug007
Technical User
Greetings!
I know it's something really simple but we seem to be drawing a blank......?
You know how Access has their own default gray message boxes when certain functions are done.....
Well.... we've got a field that we marked as "Required" in the tables properties so that the user cannot leave that field until they do some data entry. However, we want our own customized message to pop-up instead of that long & user-'UN'friendly MS Access message box that pops up. We want our own message that says they cannot leave the system unless they enter some notes in that field.
Do we need to set-up a macro? Can we just put something in the Validation Rule & Validation Text? Can we just add it in our VB code maybe?
I know it's something simple & we've done it before.... but I've got a "brain fart"! Can't seem to lock in the route on how to bypass Access' message box.
Here's a piece of our form's code, but our message box won't pop....
----------------------------------------------------
Private Sub Notes_Enter()
If IsNull(Me.ntNotes.Value) Then
Me.ntNotes.Locked = False
'MsgBox "You must enter notes before exiting the system!"
RetValue = MsgBox("You must enter notes before exiting the system!", vbOK)
End If
End Sub
----------------------------------------------------
YOUR EXPERTISE IS DESPERATELY NEEDED!!!! Thanx so much!
I know it's something really simple but we seem to be drawing a blank......?
You know how Access has their own default gray message boxes when certain functions are done.....
Well.... we've got a field that we marked as "Required" in the tables properties so that the user cannot leave that field until they do some data entry. However, we want our own customized message to pop-up instead of that long & user-'UN'friendly MS Access message box that pops up. We want our own message that says they cannot leave the system unless they enter some notes in that field.
Do we need to set-up a macro? Can we just put something in the Validation Rule & Validation Text? Can we just add it in our VB code maybe?
I know it's something simple & we've done it before.... but I've got a "brain fart"! Can't seem to lock in the route on how to bypass Access' message box.
Here's a piece of our form's code, but our message box won't pop....
----------------------------------------------------
Private Sub Notes_Enter()
If IsNull(Me.ntNotes.Value) Then
Me.ntNotes.Locked = False
'MsgBox "You must enter notes before exiting the system!"
RetValue = MsgBox("You must enter notes before exiting the system!", vbOK)
End If
End Sub
----------------------------------------------------
YOUR EXPERTISE IS DESPERATELY NEEDED!!!! Thanx so much!