Trouble Synchronizing Form and Subform

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

Guest

Access 2003. I have a form with a subform. The parent and child properties
of the subform are set to the appropriate field, which is the primary key of
table associated the main form and a corresponding key in the table
associated with the subform.

The problem I am encountering shows up when I add a new record to the main
form. After I have typed information for the new record in the main form,
and then move to the subform, the main form does not stay on the record I
just created, but instead moves to the last record that existed before
creating the new record. Thus, when I put information into the subform, it
becomes related NOT to the new record, but to the last record. The new
record does exist, but has been moved to the beginning of the recordset for
the main form (This is where this new record would go according to the way I
sort the data for the main form).

Why does my form move to the last previous record when I move to the
subform, instead of staying on my new record? Why does my new record get
shuffled to the beginning of the recordset when I move to the subform?
Thanks for any help.
 
I'm a newbie, and this is just a shot in the dark, but it might be
worth looking at the tab order of your main form. You don't say how you
enter the subform, but depending on where the subform is in the tab
order, if you tab through the fields, you might be tabbing into the
next record of the main form (though why this would be the last record,
I'm not sure) instead of the related record in the subform.

Karen
 
The main form's datasource was a query which was sorting on multiple fields.
When I reduced the number of fields being sorted to just one, then I did not
have the problem any longer. For whatever reason, the multiple sorting was
causing the form to requery when I moved from the main form to the subform on
a new record.
 
Back
Top