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

Code for refreshing a form after updating a subform

Status
Not open for further replies.

TheunsGoosen

Technical User
Jan 17, 2007
36
GB
Access beginner
Hi,

I have a Command button on my form that works perfectly. It refreshes the form and all the sub-forms with the following code:

DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

..but I need one of the sub-forms that was created from a query to refresh the form after updating one of the cells. I have tried the following and it’s not working.

Private Sub ActionCode_AfterUpdate()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
End

Thanks
Theuns
 
You can use Requery, for example:

[tt]Me.Requery
Me.cboCombo.Requery
Me.[A Subform Control].Form.Requery[/tt]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top