Hello all,
I am hoping that you can help me with a problem that has occurred numerous times on various forms in the two databases that I am working on. When I first add a subform to a form linking child and master fields (primary key and foreign key), the subform will automatically update when the master field on the main form is changed (it is in a combo box). However, when I work more on the form - making it a bit more complicated, adding code, search boxes, etc. The subform stops updating, but rather stays on one record even when the master field is changed (when a new value is selected from the combo box that has the master field as its bound column).
I have tried using Me.Requery in the AfterUpdate Event of the combo box, but this requeries the entire form's contents, resetting it to the first record. I have also tried Me.[SUBFORMNAME].Requery, but this does not seem to work.
Does anyone know why this feature – the automatic link between child and master fields does not always work? Or why requerying the subform itself does not work? I would appreciate any suggestions.
Many thanks, in advance.
Bridget
I am hoping that you can help me with a problem that has occurred numerous times on various forms in the two databases that I am working on. When I first add a subform to a form linking child and master fields (primary key and foreign key), the subform will automatically update when the master field on the main form is changed (it is in a combo box). However, when I work more on the form - making it a bit more complicated, adding code, search boxes, etc. The subform stops updating, but rather stays on one record even when the master field is changed (when a new value is selected from the combo box that has the master field as its bound column).
I have tried using Me.Requery in the AfterUpdate Event of the combo box, but this requeries the entire form's contents, resetting it to the first record. I have also tried Me.[SUBFORMNAME].Requery, but this does not seem to work.
Does anyone know why this feature – the automatic link between child and master fields does not always work? Or why requerying the subform itself does not work? I would appreciate any suggestions.
Many thanks, in advance.
Bridget
Comment