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.
 
It might be helpful to know which error messages you are
having difficulty with...
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top