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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh main form after activities in the subform 1

Status
Not open for further replies.

mtabt

Technical User
Apr 25, 2001
23
US
I have a command button in the subform of main form to bring up another form (form1) to enter data. After the form1 is closed, I need to refresh the main form and subform to reflect the changes. I tried the normal way such as

*DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

*DoCmd.requery
etc.

But, nothing works.

However, if the command button is located in the main form, everything is ok.

Therefore, my question is how to focus and refresh the main form after I click on this command button in the subform?

Thank you very much
 
On the data entry form's Close Event try this:

Forms![MainFormNameHere].Requery
Forms![MainFormNameHere].Refresh

Hope this helps. ljprodev@yahoo.com
Professional Development
MS Access Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top