Why no Refresh All option in code?

Posted on 2008-11-04
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

    requery the subform
    LVL 74

    Assisted Solution

    by:Jeffrey Coachman

    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

    Thank you both

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now