[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

MS Access unwanted GUI effect.

Posted on 2014-08-29
6
Medium Priority
?
197 Views
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.
0
Comment
Question by:midfde
6 Comments
 
LVL 14

Expert Comment

by:Russell Fox
ID: 40293859
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

0
 
LVL 1

Author Comment

by:midfde
ID: 40293885
Sorry, the answer is wrong. Echo method is for something different. It does not and should not do what I want.
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 40293920
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 ?
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
LVL 29

Expert Comment

by:IrogSinta
ID: 40294053
Replace the line
Me.SelectedMet.Form.Recordset.AbsolutePosition=ap
with
Me.SelectedMet.Form.Refresh

Ron
0
 
LVL 49

Expert Comment

by:Dale Fye
ID: 40294354
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!"
0
 
LVL 1

Author Closing Comment

by:midfde
ID: 40294436
is the ExecuteNonQuery function requerying the Form ?
Not any more...
".Requery" --> ".Repaint
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

825 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