B
Beth
I have run into a situation with a form/subform that I can't resolve. I am
open to suggestions.
The main form has 3 fields on it, a date with a default value, the id field
which is an autonumber, and one text field. Because of the autonumber and
the default date, a user has to enter something in the text field to
generate a record in the main form.
Frequently our users are going straight to the subform and so they get an
error that no record matches in the main form.
Is there any event/code/command I can use so that when they try to put a
record in the subform, it checks for a null id in the main form and
generates a record there?
I tried some code on the before update event for the first field in the
subform (a combo box) to add some text to that text field. That generates
an autonumber in the main form and in the matching subform. However, it
doesn't update that record to the underlying table, so I still get the
error.
I really need some help on this, so I am open to any suggestions you have.
Thanks!
Beth
open to suggestions.
The main form has 3 fields on it, a date with a default value, the id field
which is an autonumber, and one text field. Because of the autonumber and
the default date, a user has to enter something in the text field to
generate a record in the main form.
Frequently our users are going straight to the subform and so they get an
error that no record matches in the main form.
Is there any event/code/command I can use so that when they try to put a
record in the subform, it checks for a null id in the main form and
generates a record there?
I tried some code on the before update event for the first field in the
subform (a combo box) to add some text to that text field. That generates
an autonumber in the main form and in the matching subform. However, it
doesn't update that record to the underlying table, so I still get the
error.
I really need some help on this, so I am open to any suggestions you have.
Thanks!
Beth