A
Ann
I am having a really hard time with required fields. First I made them
required in the table but if i tried to make a form that didn't use all the
fields from the table nothing worked because I was always told I had required
fields that needed to be entered even though they weren't on the form. OK, I
get that since they are part of the record in the table. Then I tried the
code listed below on as many of the events that made sense and it never
worked.
If IsNull(Me.txtContainer) Then
MsgBox "Required Field!"
Cancel = True
txtContainer.SetFocus
End If
Then I tried putting ([txtContainer] is not null) on the Validation Rule
property. That works if I bring up an existing record and remove what is
there but if I try to bypass the field on a new record it lets me. Can
someone help me out with how this is supposed to work. I really thought all
I had to do was make the field required in the table and that was it. Thanks
for the help.
required in the table but if i tried to make a form that didn't use all the
fields from the table nothing worked because I was always told I had required
fields that needed to be entered even though they weren't on the form. OK, I
get that since they are part of the record in the table. Then I tried the
code listed below on as many of the events that made sense and it never
worked.
If IsNull(Me.txtContainer) Then
MsgBox "Required Field!"
Cancel = True
txtContainer.SetFocus
End If
Then I tried putting ([txtContainer] is not null) on the Validation Rule
property. That works if I bring up an existing record and remove what is
there but if I try to bypass the field on a new record it lets me. Can
someone help me out with how this is supposed to work. I really thought all
I had to do was make the field required in the table and that was it. Thanks
for the help.