Group: microsoft.public.access.forms
From: =?Utf-8?B?c2NvdHQwNA==?=
Date: Friday, November 16, 2007 11:00 AM
Subject: RE: Form coding question

Would i just put something like the following?:

Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.First_Name) Then
MsgBox "Please enter the first name ", vbCritical
Cancel = True
First_Name.SetFocus
End If
If IsNull(Me.ReceivedDate) Then
MsgBox "Please enter the received date ", vbCritical
Cancel = True
ReceivedDate.SetFocus
End If
End Sub
When i put this code in it runs for both fields but then i get a message
popup The doMenuItem action was canceled.