G
Guest
I have a subform on an unbound main form (there are many reasons the form is
unbound). The subform is created from a linking table containing two ID
fields which allows a "many to many" relationship to be two "one to manys."
When I enter data on the main form, the subform automatically generates an
incomplete record (it is missing the ID field from the main form because the
main form doesn't create the autonumber ID field until it is saved with a
command button). I tried making the linking table's fields, both be primary
keys, but then when activating the main form, I get a message "Field can not
have a null value". If I take off the primary keys, then it writes a record
(an empty record) to the linking table everytime I run the main form.
How do I have the subform wait for the autonumber ID field on the main form
and then create a complete record in the subform (which is bound to the
linking table)?
unbound). The subform is created from a linking table containing two ID
fields which allows a "many to many" relationship to be two "one to manys."
When I enter data on the main form, the subform automatically generates an
incomplete record (it is missing the ID field from the main form because the
main form doesn't create the autonumber ID field until it is saved with a
command button). I tried making the linking table's fields, both be primary
keys, but then when activating the main form, I get a message "Field can not
have a null value". If I take off the primary keys, then it writes a record
(an empty record) to the linking table everytime I run the main form.
How do I have the subform wait for the autonumber ID field on the main form
and then create a complete record in the subform (which is bound to the
linking table)?