form closes after error message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I don't understand why the entry form closes after I click OK. Form's Before
Update code is as follows:

On Error GoTo ProcError

If Len(Me.LastName & vbNullString) = 0 Then
Msgbox "Last name is required", vbOKOnly
Me.LastName.SetFocus
Cancel = True
End If

ExitProc:
Exit Sub

ProcError:
the usual.....

TIA,
Gin
 
Back
Top