Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPDATING FORMS 1

Status
Not open for further replies.

Kevsim

Instructor
Apr 18, 2000
385
AU
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
 
Remember that a form generally represents a recordset. What you really want to update is that rocordset. You can update the recordset iin form B from say a command button on form A or an event on A such as a formfield's afterupdate. Then all you have to do is to requery that field on formB the next time you open.

Rollie E
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top