I have an access form and within that form, there is a subform where I have a button with an onclick event that runs an update query for a singular record. I would like to refresh the main form on the onclick event in the subform but the issue is that the subform is present in 2 other forms as well, so using [Forms]![TheFormYouWantUpdated].Refresh
does not work as it causes a "could not find" associated form error loop in the other 2 forms. Is there a way to refresh a main form without calling the form's name?
CodePudding user response:
Yes. The Parent
property of a subform refers to the subform's current main form:
Me.Parent.Refresh