G
Guest
Hello. I have a combo box which is used to select a member's name (this is on
a subform). All goes well if the user selects a name. However, if the user
clicks on the combo field and then decides not to select a name, there is a
Access message:
The field 'ReadResults.ContactID' cannot contain a Null value because the
required property is set to True. Enter a value in this field.
And then the user MUST select something in this field and then delete it.
Once you touch the combo box field, you just can't get out it unless you
select something. Extremely frustrating.
Worse, there are 2 combo boxes on the subform and I get the same error for
'ReadResults.AnimalID'. I don't have many fields required but I do need both
of these.
I would appreciate help in setting up a message box saying the field is
required, with a yes/no and clearing the field so the user can move on. Maybe
something along this line, but not sure how to trigger the message box
appropriately.
If vbNo = MsgBox("This is a required field. Are you sure you don't want to
enter a member name?", vbQuestion + vbYesNo)
Cancel = True
Thanks for your time!
a subform). All goes well if the user selects a name. However, if the user
clicks on the combo field and then decides not to select a name, there is a
Access message:
The field 'ReadResults.ContactID' cannot contain a Null value because the
required property is set to True. Enter a value in this field.
And then the user MUST select something in this field and then delete it.
Once you touch the combo box field, you just can't get out it unless you
select something. Extremely frustrating.
Worse, there are 2 combo boxes on the subform and I get the same error for
'ReadResults.AnimalID'. I don't have many fields required but I do need both
of these.
I would appreciate help in setting up a message box saying the field is
required, with a yes/no and clearing the field so the user can move on. Maybe
something along this line, but not sure how to trigger the message box
appropriately.
If vbNo = MsgBox("This is a required field. Are you sure you don't want to
enter a member name?", vbQuestion + vbYesNo)
Cancel = True
Thanks for your time!