subform create entry in parent form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a form with a subform. How do I set it up so that If i create an
etry in the subform a blank entry is frist created in the parent form?

Thank you

Daniel P
 
You can't.
If you expect the main form to be blank how do you expect to relate the two
records? There has to be some correlation.
 
The parent form, like most forms, is driven by an autopopulated autonumber.
thus I just would like to know how to make it register that I am populating
the subform thus create an autonumber entry so it can associate the suform
data to it.

Daniel P
 
The parent form, like most forms, is driven by an autopopulated autonumber.
thus I just would like to know how to make it register that I am populating
the subform thus create an autonumber entry so it can associate the suform
data to it.

In order to generate an autonumber value, and make the parent record available
(so that there's something for referential integrity to link to), you must
"dirty" the record before setting focus to the subform. Are there any fields
OTHER than the autonumber in the mainform's recordsource?

Perhaps you can use code in the form's open event to populate some field (so
that the autonumber will fill) - but how you'll move to a new record I'm not
sure!

John W. Vinson [MVP]
 
Back
Top