required field in form

M

Mark

Hi all,

On a form, I have a couple of fields that I would like the
user to be required to fill in before being able to save
the reocrd. And prompt the user to fill in the field when
they try to tab out of the field.

First, I tried placing "Is Not Null" in the validation
rule of the properties box, but that is not quite what I
am looking for because when the form is first opened...
the user can tab through the required fields without
getting any message prompt. In this case, the validation
rule only seems to be applied if the user enters data in
the field and then later deletes the data... then the
message will prompt the user saying that the field is
required.

Second, I have tried using event procedures to accomplish
this, but I am having trouble with errors. I have tried
something like the following in the On Exit and On Lost
Focus events:

If IsNull(Me.CaseDate) Then
Me.CaseDate.SetFocus
EndIf

But the focus gets placed on the next field (in tab order)
and not on the current field.

Any suggestions would be a great help! Thanks!
 
Top