Error messages

  • Thread starter Thread starter James Williams
  • Start date Start date
J

James Williams

Hello there,
Im having great difficulty with error messages and
wondered if anyone could help me.
I know it has to be entered into VB, but dont know what to
enter or where to enter it. Any help would be greatly
appreciated.

Thank you for your time.
 
use the event procedures for the field, button etc.. for
example if you want to check an entered value for a field
you would use the AfterUpdate Event. Double click in the
event box until it says [Event Procedure]. then use
the ... to the right to get to the actual code.

An example of code could be:

Private Sub FieldName_AfterUpdate()

If Me.FieldName = 0 Then
MsgBox "Field Can Not be Zero", vbinformation, "Error"
Me.FieldName.SetFocus
End If
End Sub


After the commas it will prompt you for choices if you
want to use other parms.
 
Back
Top