ChildForm not saving Parent index??

  • Thread starter Thread starter Random
  • Start date Start date
R

Random

I am opening a new form on a filter for the current record on a parent form.
I can add to the database on the new form, but it is not saving the foreign
key in the table the child form is based off of, just the other data. What
do I need to do to get it to save the foreign key?
 
Random said:
I am opening a new form on a filter for the current record on a parent form.
I can add to the database on the new form, but it is not saving the foreign
key in the table the child form is based off of, just the other data. What
do I need to do to get it to save the foreign key?

Opening a form with a filter does nothing to impose that filter on any
new records created. You would have to run code either in the calling
form or in the open event that changed the DefaultValue property of the
opened form.

The only time a form "inherits" the foreign key value from the parent
form automatically is when it is embedded in a subform control within
the parent form.
 
Back
Top