Why no Refresh All option in code?

I am using Access 2007.

I have a situation where information on a sub form of a certain form is not getting updated correctly when retrieving a new record. The solution is simple; I click on the Refresh All button on the ribbon for the form.

I supposed it would be easy enough to do the same in code, but it is not. There is a Refresh option, but not RefreshAll. Refresh (in code) does not fix the problem.  RefreshAll does when I selected it from the forms ribbon.

How does one issue a RefreshAll in code?
Who is Participating?
wiswalldConnect With a Mentor Commented:
requery the subform
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:

The "Refresh all" option is not available in code because it is a "Hammer"
A brute force option for end users who can't know when or where to requery and/or refresh (Or even what the difference is)

To use this in code would be sloppy and time consuming, because it requeries everything, whether it needs it or not.
For complex forms this can take a long time.
(Would you want your mechanic to bill you for changing all 4 tires if you only had a blowout in one of them?)

"Refresh (in code) does not fix the problem."
You should have tried "ReQUERY".
You also did not say where or when you used it?

I'm with wiswalld:
  "requery the subform"

WoodrowAAuthor Commented:
Thank you both
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.