I have 2 forms, Form “A” and Form “B”. I Update data in Form “A” while Form “B” is closed, when I open Form “B” all the updated data is in the controls. If I try to update the data in Form “A” while Form “B” is open, the data does not appear in the controls of Form “B”. I add the following code in form “A”
Private Sub Form_AfterUpdate()
Forms![F_SearchParts]![Combo10].Requery
Forms![F_SearchParts]![Combo14].Requery
Forms![F_SearchParts]![Combo16].Requery
Forms![F_SearchParts]![Combo20].Requery
End Sub
While both forms are open Form “B” updates OK. Now if I try to update Form “A” with Form “B” closed, I receive an error message because I have not opened Form “B”, I can overcome this by opening Form “B” using code then not making the form visible. My question- “Is there a way to update Form “B” no matter if it is open or closed.” I would appreciate any advise.
kevsim
Private Sub Form_AfterUpdate()
Forms![F_SearchParts]![Combo10].Requery
Forms![F_SearchParts]![Combo14].Requery
Forms![F_SearchParts]![Combo16].Requery
Forms![F_SearchParts]![Combo20].Requery
End Sub
While both forms are open Form “B” updates OK. Now if I try to update Form “A” with Form “B” closed, I receive an error message because I have not opened Form “B”, I can overcome this by opening Form “B” using code then not making the form visible. My question- “Is there a way to update Form “B” no matter if it is open or closed.” I would appreciate any advise.
kevsim