MS Access unwanted GUI effect.

Posted on 2014-08-29
Last Modified: 2014-08-31
MS Access moves screen view after executing event procedure. Please help to avoid this. How can I prevent from happening of what you can see on the attached image.I want the user to see checkbox values changed, no any other movements.
Question by:midfde
    LVL 13

    Expert Comment

    by:Russell Fox
    Try turning off the screen refresh with the application echo:
    ...Dim ap As Long
       Application.Echo False 
       Application.Echo True 
    End Sub

    Open in new window

    LVL 1

    Author Comment

    Sorry, the answer is wrong. Echo method is for something different. It does not and should not do what I want.
    LVL 75

    Accepted Solution

    How about this:

    Dim vBm as Variant
    vBm = Me.RecordsetClone.Bookmark.

    'your execute NonQuery line of code here

    Me.BookMark = vBm

    However, question:
    is the ExecuteNonQuery function requerying the Form ?
    LVL 29

    Expert Comment

    Replace the line

    LVL 47

    Expert Comment

    by:Dale Fye (Access MVP)
    If I understand correctly, after the requery, you want the selected row to show up in the same position (vertically) within the continuous form as before you clicked the button.

    Steve Lebans, one of the true geniuses in the Access community, has stopped updating his web-site, but has a database with some samples of how to do this on his web-site.

    At the very bottom of that page, he says:
    "OK, for most situations, one of the above 3 methods will work fine. Still,  you'll notice that the  row we've selected appears as the top row displayed in the Form. Again this can be disconcerting to the user if the record they were working on prior to the Requery was at say the bottom of the screen. In order to restore the  displayed order of the rows after a Requery requires jumping through a lot of hoops. I don't personally feel it is worth it but that's up to you. There is a sample database in this archive detailing what hoops to jump through. Have fun!"
    LVL 1

    Author Closing Comment

    is the ExecuteNonQuery function requerying the Form ?
    Not any more...
    ".Requery" --> ".Repaint

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…
    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.

    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

    18 Experts available now in Live!

    Get 1:1 Help Now