[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Why no Refresh All option in code?

Posted on 2008-11-04
Medium Priority
Last Modified: 2013-11-28
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?
Question by:WoodrowA
LVL 13

Accepted Solution

wiswalld earned 1000 total points
ID: 22877950
requery the subform
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 1000 total points
ID: 22883484

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"


Author Closing Comment

ID: 31513153
Thank you both

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question