Override system message

  • Thread starter Thread starter Lynn Pennington
  • Start date Start date
L

Lynn Pennington

I have a table with some required fields.

I have a form to edit the fields.

How do I override the system message that it is
a "Required Field"? I would like to have a simple message
for the end user "Invalid Server Name." with a "OK" button
then set focus on the text box.

If IsNull(Me.txtServerName) Then
Msgbox "Invalid Server Name."
Me.txtServerName.SetFocus
End If

Please advise.
Thanks.
Lynn.
 
How do I override the system message that it is
a "Required Field"? I would like to have a simple message
for the end user "Invalid Server Name." with a "OK" button
then set focus on the text box.

If IsNull(Me.txtServerName) Then
Msgbox "Invalid Server Name."
Me.txtServerName.SetFocus
End If

Put this code as written in the Form's BeforeUpdate event, and in
addition add a line before the End If

Cancel = True
 
Thank You. Lynn.
-----Original Message-----


Put this code as written in the Form's BeforeUpdate event, and in
addition add a line before the End If

Cancel = True



.
 
Back
Top