Refresh form button in access 2010

Posted on 2012-08-23
Last Modified: 2012-08-23
Hi.  I have form which includes multiple tabs.  One of the form tabs reflecting calculations.

Issue: data was not constantly stored in the database after I adjust field "x" or field "z"  

See below: field "y" = field "x" + field "z" (of course I mean values)

form field "q" taken from the source query which involves value of the field "y"

I have button to refresh form data with the following code  "DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70"

I suggested to replace above listed code with Me.Refresh  

Question: would you please tell me wheter above listed code <b>"DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70" </b> is correct and reliable? Can we use such code at any time or we have some limitations?

Per my opinion, the code Me.Refresh or Me.Requery is more sofisticated in order to refresh data in the form using calculated fields.
Question by:maximyshka
    LVL 74

    Accepted Solution

    That syntax is correct, although it may not always remain valid in Access 2007 or newer database formats.
    That is really an old way of doing things in code.

    Wouldn't you agree that:
    ...are much easier to write and understand?



    Author Comment

    What about me.refresh or me.requery

    Same thing or any issues?
    LVL 74

    Expert Comment

    by:Jeffrey Coachman


    That is what I meant..

    See, you correcting me now, ...soon you won't need us at all...



    Featured Post

    What Security Threats Are You Missing?

    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.

    Join & Write a Comment

    Suggested Solutions

    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    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…

    728 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

    14 Experts available now in Live!

    Get 1:1 Help Now