Reputation: 71
I have a Main Form with a Subform within it. The Main Form [Test] is just a drop down of names. I want the Subform to pull up the addresses associated with the name that is chosen. I have tried the following:
On the Drop Down on "After Update"
Me.Address_DatasheetSub1.Form.Refresh
Me.Address_DatasheetSub1.Form.Requery
Forms![Test].[Address_DatasheetSub1].Form.Refresh
Forms![Test].[Address_DatasheetSub1].Form.Requery
I have also tried on separate button "On Click"
Me.Address_DatasheetSub1.Form.Refresh
Me.Address_DatasheetSub1.Form.Requery
Forms![Test].[Address_DatasheetSub1].Form.Refresh
Forms![Test].[Address_DatasheetSub1].Form.Requery
Nothing seems to work. However if I am on the Form View and press the "Refresh All" button on the Access ribbon, it works.
Upvotes: 0
Views: 58
Reputation: 55806
Yes, use the LinkMasterFields and LinkChildFields properties of the subform control.
and remove all code regarding the requery.
Upvotes: 1