I'd like to refresh the table located under the History tab whenever I enter new data under Payments. I tried adding an onclick macro when History tab is clicked but the new macro editor in Access 2010 confuses me.
As can be seen in the picture below, I've already added a fourth entry in Payments subform and the new entry does not show up in the table under History Tab.
I think Refresh or requery is the way to go but I don't know how to set it up to get it to work. Any help would be appreciated.
The best place to run the requery would be the After Update event for the payments subform.
Private Sub Form_AfterUpdate()
Me.Parent.HistorySubformConrolName.Form.Requery
End Sub
Make sure you use the name of the subform control, not the name of the form contained. See http://access.mvps.org/access/forms/frm0031.htm
Creating events: http://office.microsoft.com/en-us/access-help/about-events-and-event-procedures-HP005186744.aspx
EDIT in this particular case:
Me.Parent.Payment_Info.Form.Requery
Me.qryListExpertsHistory_subform.Requery
' qryListExpertsHistory_subform (is the embedded form)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.