Jumping Scrollbar

radek225

Registered User.
Local time
Today, 05:36
Joined
Apr 4, 2013
Messages
307
I hava a list of my orders (subform datasheet based on a query), this list is updating every 30 seconds (status need to be updated). The problem was position cursor after requery, but I found the code:
Code:
Dim strBookmark As String
strBookmark = Me![frmAktPD].Form.Recordset.Bookmark
Me![frmAktPD].Form.Requery
Me![frmAktPD].Form.Recordset.Bookmark = strBookmark
It works great, but only If I don't use vertical scrollbar. If I select some record which is e.g. at the bottom line, then after requery cursor jump to top and again back to my position, this operation changing the view, so this is annoying for user.
Is there some way to fix it (I mean without jumping scrollbar, maybe some way to update query every 30 seconds not subform)?
 
Last edited:
When something like this is happening it os often useful to think logically what you would need to do manually to havethe view you require. For example, after the requery, do you need to move down/up (say) 6 records. Do it manually to decide and then write a some code to do what you did manually. There may be a particular circumstance that means to only need to run this code, like if the scroll bar has been used. Unfortunately Access does not have an On Scrollbar event so you will need to find another way to trigger this code.
 
Spikepl it doesn't work. scrollbar still jumping. In my last version, I had a list instead datasheet and in this variant scrollbar did not jump, but datasheet is more clear...Anyway is there any way to update datasheet without .requery option? The problem is that .requery Set focus on the first row in the datasheet (so scrollbar jumps)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom