M
Mikal
I have a form using a tab control for editing customer details and a
single subform that can be used to add/edit up to 5 addresses.
The underlying tables are linked by a ClientID field in each table. The
subform is linked as follows Master Field ClientID;[optGrpLocation] and
Child Field ClientID;Location (being any value from 1 to 5). The idea
being that a change in the option group on the main form causes the
subform to display the relevant address.
Everything works fine whilst scrolling through records, I can navigate
between the different addresses using the option group, I can navigate
between records on the main form and the address is updated. However,
as soon as a record in the subform is edited or added the contents of
that record remain on the subform no matter what I do. For example if I
go to another record on the main form the old subform contents remain
displayed, and the subform loses its link to the record on the main
form (ie the subform displays a different clients address on the
subform and the ClientID fields are different). I have tried requerying
the subform and changing the subforms recordsource through code. This
only leads to the subform remembering the value of the last editied
field in the subform and displaying it in that field until such time as
I close the form.
There is no code in the subform (or rather i've stripped it all out for
now) Using A97.
Any help much appreciated as its had me stumped for too long.
Cheers
Mikal
single subform that can be used to add/edit up to 5 addresses.
The underlying tables are linked by a ClientID field in each table. The
subform is linked as follows Master Field ClientID;[optGrpLocation] and
Child Field ClientID;Location (being any value from 1 to 5). The idea
being that a change in the option group on the main form causes the
subform to display the relevant address.
Everything works fine whilst scrolling through records, I can navigate
between the different addresses using the option group, I can navigate
between records on the main form and the address is updated. However,
as soon as a record in the subform is edited or added the contents of
that record remain on the subform no matter what I do. For example if I
go to another record on the main form the old subform contents remain
displayed, and the subform loses its link to the record on the main
form (ie the subform displays a different clients address on the
subform and the ClientID fields are different). I have tried requerying
the subform and changing the subforms recordsource through code. This
only leads to the subform remembering the value of the last editied
field in the subform and displaying it in that field until such time as
I close the form.
There is no code in the subform (or rather i've stripped it all out for
now) Using A97.
Any help much appreciated as its had me stumped for too long.
Cheers
Mikal