I figure this must be a common problem, but I haven't found any information on it in the forums.
I have a standard form/subform setup, where my subform displays each of the many records found for the current record found on the primary form. The relationship is defined in the Relationship window (1-Many). The subform displays records in a continuous form view. When I load the form and navigate through the records, there are no problems - but when I add a record to the subform, it displays all of the records from the subforms datasource, instead of just the related records.
I have extensively tried to refresh the subform from methods on both the parent form and the subform itself, but this doesn't work. The only method I've found that "sort of" works is to reset the linkchildfields and linkmasterfields properties, but this also causes problems. I display information about the the current record selected on the subform using the parent form, and when I reset the linkchildfields and linkmasterfields properties, the information is incorrect -- it displays information about the wrong record in the subform.
Two other things to note is that technically, the linkchildfields and linkmasterfields properties never change. If I don't reset them after adding a record, they are still both set to exactly what they should be (Primary Key of parent, Foreign Key of subform). Second, if I take the form into design view and then back into form view, there aren't any problems.
Anyone have any ideas? Help would be much appreciated.
I have a standard form/subform setup, where my subform displays each of the many records found for the current record found on the primary form. The relationship is defined in the Relationship window (1-Many). The subform displays records in a continuous form view. When I load the form and navigate through the records, there are no problems - but when I add a record to the subform, it displays all of the records from the subforms datasource, instead of just the related records.
I have extensively tried to refresh the subform from methods on both the parent form and the subform itself, but this doesn't work. The only method I've found that "sort of" works is to reset the linkchildfields and linkmasterfields properties, but this also causes problems. I display information about the the current record selected on the subform using the parent form, and when I reset the linkchildfields and linkmasterfields properties, the information is incorrect -- it displays information about the wrong record in the subform.
Two other things to note is that technically, the linkchildfields and linkmasterfields properties never change. If I don't reset them after adding a record, they are still both set to exactly what they should be (Primary Key of parent, Foreign Key of subform). Second, if I take the form into design view and then back into form view, there aren't any problems.
Anyone have any ideas? Help would be much appreciated.