This is the basic code for checking the field
If IsNull(txb_Programs) Then
MsgBox "The Program must be entered", vbOKOnly
txb_Program.SetFocus
DoCmd.CancelEvent
Exit Sub
End If
> Marshall,
> Thanks for the reply. I am confused. Is this what you are describing? If
[quoted text clipped - 18 lines]
> > Marsh
> > MVP [MS Access]
Marshall Barton - 03 Mar 2005 21:53 GMT
Well, that should work, but what I was suggesting was:
If IsNull(txb_Programs) Then
MsgBox "The Program must be entered", vbOKOnly
txb_Program.SetFocus
Cancel = True
Exit Sub
End If
I try to avoid DoCmd whenever there is an alternative,
because it does not allow you to specify which object it is
supposed to operate on. In this case, it probably doesn'e
make a lot of difference.
Try it and see if it does what you want.

Signature
Marsh
MVP [MS Access]
>This is the basic code for checking the field
>
[quoted text clipped - 15 lines]
>> > prevent the form from moving off the current record until
>> > your checks for missing data pass.