I have a form with two subforms, I want update one of the subform with a new row (subform in dataheet view) with data entered into a second subform(form view). The update happens, but the new row does not appear on the subform that is in datasheet view. If I set the focus to that sub form and press shift F9 the form will update. So asking if there is a way to make this happen automatically using vb?How do I refresh a subform in Access 2003 using VB?
Yes, there is a way:
In the second subform that you use to enter data, go to properties, and create event procedure for event ';After Update';. Then insert the following command into created sub:
Forms![MainFormName].Refresh
Make sure to place actual form name instead of MainFormName, but keep the square brackets.
No comments:
Post a Comment