A
Alex
FieldOne and FieldTwo are controls on my form that have a required data field
in my table. A user types in a value in FieldOne, then selects a value in
FieldTwo from a combo box. If the user deletes/changes what he's typed in
FieldOne, I need FieldTwo set to null so that the user knows he has to pick
another choice in FieldTwo. Her is my code:
Private Sub FieldOne__Change()
Me.FieldTwo = ""
Me.FieldThree = ""
End Sub
I kept getting an error msg. that I couldn't set the required FieldOne to
null. To fix that, in the table I set the Allow Zero Length to Yes. Now, a
user is able to close the form without a value in FieldTwo. Is there a way I
can set FieldTwo to null if the value in FieldOne is changed without getting
the error message and still require FieldTwo before closing? Thanks.
in my table. A user types in a value in FieldOne, then selects a value in
FieldTwo from a combo box. If the user deletes/changes what he's typed in
FieldOne, I need FieldTwo set to null so that the user knows he has to pick
another choice in FieldTwo. Her is my code:
Private Sub FieldOne__Change()
Me.FieldTwo = ""
Me.FieldThree = ""
End Sub
I kept getting an error msg. that I couldn't set the required FieldOne to
null. To fix that, in the table I set the Allow Zero Length to Yes. Now, a
user is able to close the form without a value in FieldTwo. Is there a way I
can set FieldTwo to null if the value in FieldOne is changed without getting
the error message and still require FieldTwo before closing? Thanks.