G
Guest
I have a main form (called "mine" at present) containing library details,
with several subforms (eg "subfrmHOURS", detailing opening hours for the
particular library) that are opened from the main form with the record
corresponding to the library that was displayed on the main form. The link is
the library ID, present in both library and HOURS table. This was set up
using the Form Wizard.
When I move from the library displayed on the main form, ideally the subform
should change its details to match the main form details. I have a DLookup in
the header that displays the name of the library, and this is refreshed from
a button on the subform that calls Form.Refresh. The data in the Detail
section, however, is not refreshed: it still displays details for the
previous library.
I have tried Forms!subfrmLOANS.Requery
in the Form_Activate method of the main form, results in a message that the
database can't find the subfrmLOANS .
I have tried
Private Sub cmdRefreshLoans_Click()
Form.Refresh
Form.Requery
End Sub
which has no effect on the detail.
Refresh on the Records toolbar does not change the detail either, so it
looks like Requery may be the answer.
But how? and where?
Thanks.
with several subforms (eg "subfrmHOURS", detailing opening hours for the
particular library) that are opened from the main form with the record
corresponding to the library that was displayed on the main form. The link is
the library ID, present in both library and HOURS table. This was set up
using the Form Wizard.
When I move from the library displayed on the main form, ideally the subform
should change its details to match the main form details. I have a DLookup in
the header that displays the name of the library, and this is refreshed from
a button on the subform that calls Form.Refresh. The data in the Detail
section, however, is not refreshed: it still displays details for the
previous library.
I have tried Forms!subfrmLOANS.Requery
in the Form_Activate method of the main form, results in a message that the
database can't find the subfrmLOANS .
I have tried
Private Sub cmdRefreshLoans_Click()
Form.Refresh
Form.Requery
End Sub
which has no effect on the detail.
Refresh on the Records toolbar does not change the detail either, so it
looks like Requery may be the answer.
But how? and where?
Thanks.