S
sjg1314
Hello,
I have a form with a subform--let's call the records parent and child.
Most of the fields of both records are required. The first field the
user encounters in the subform is represented as a combobox.
If the first thing the user does is select an item from the combobox in
the subform, the error "The field "X.masterID" cannot contain a Null
value because the Required property is set to True. Enter a value in
this field."
What's happing, of course, is that masterID is the foreign key in the
child record that points to the master record--which has not been
created yet (since the user started entering data into the subform).
The error is too cryptic for my users. I can catch and replace the
error, of course. What I would like to do is to prevent the user from
entering data until the master record is created.
I tried disabling the subform, which took care of the early entry
problem. But now, the user can't tab into the subform until it is
enabled. And the subform can't be enabled until the master record is
saved, which used to happen when the user tabbed into the subform. I
could add a "Save" button or the user could use the navigation buttons
to cause the record to be saved. Both slow down record entry.
What is the usual way MS Access experts deal with this? Do people just
reword the error message and leave it at that? Or is there a better
way?
P.S. If the user enters at least one field in the master record, any
attempt to move into the subform generates a much clearer error message
that I created.
I have a form with a subform--let's call the records parent and child.
Most of the fields of both records are required. The first field the
user encounters in the subform is represented as a combobox.
If the first thing the user does is select an item from the combobox in
the subform, the error "The field "X.masterID" cannot contain a Null
value because the Required property is set to True. Enter a value in
this field."
What's happing, of course, is that masterID is the foreign key in the
child record that points to the master record--which has not been
created yet (since the user started entering data into the subform).
The error is too cryptic for my users. I can catch and replace the
error, of course. What I would like to do is to prevent the user from
entering data until the master record is created.
I tried disabling the subform, which took care of the early entry
problem. But now, the user can't tab into the subform until it is
enabled. And the subform can't be enabled until the master record is
saved, which used to happen when the user tabbed into the subform. I
could add a "Save" button or the user could use the navigation buttons
to cause the record to be saved. Both slow down record entry.
What is the usual way MS Access experts deal with this? Do people just
reword the error message and leave it at that? Or is there a better
way?
P.S. If the user enters at least one field in the master record, any
attempt to move into the subform generates a much clearer error message
that I created.