Refreshing A subform

Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc used Ask the Experts™
on
Hi

Kindly advise whether the code below can refresh the sub form properly:

Private Sub Refresh_Click()
DoCmd.Save
DoCmd.Close
Docmd.Opern Form " Accounts"
End Sub

I have tried the Me.Requery nothing seams working up

Regards

Chris
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Database Expert
Awarded 2016
Top Expert 2016
Commented:
You can try like ..

Me.yourSubFormConyrol.Form.Requery
On after update event??????????
Or do you mean like this

Private Sub Refresh_Click()
DoCmd.Save
Me.yourSubFormConyrol.Form.Requery
End Sub
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
Yes.
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
Hi,
You need to select my comment and then click on the submit. That's the way we close the questions.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial