OK thanks. I'll post a link when I add it to my website. Hopefully, sometime next week
Quick postscript. One thing I forgot to mention is that if you don't want your second subform (the one with the player details) to keep requerying while you're scrolling – maybe because requerying is slow – you can use Form_Timer instead of Form_Current:
You can try different values for the timer; 100 just happens to be adequate for this database on the laptop I'm currently using. You can also make controls on the second subform invisible while you're scrolling and visible again after the requery (making the detail section as a whole invisible looks messy).Code:Private Sub Detail_Paint() If Me.CurrentSectionTop > 0 Then Me.TimerInterval = 0 Me.Recordset.Bookmark = Me.Bookmark Me.Recordset.Move -Round(Me.CurrentSectionTop / Me.Section(acDetail).Height) Me.TimerInterval = 100 End If End Sub Private Sub Form_Timer() Me.TimerInterval = 0 Me.Parent!PlayerDetails.Form.Requery End Sub
Hi
Yes I'd already tried that when I was having issues previously.
Perhaps surprisingly I found there was LESS flicker using a timer than using the original code based on Form_Current
I definitely wouldn't keep toggling the visibility of the second subform.
Just finished editing the YouTube video of Mike Wolfe's session on Building Ribbon Interfaces in Code for Access Europe and may start on the web page for this later today
BTW Are you happy for me to use your @Remster user name in the attribution? If you would prefer me to use your real name, please PM or email me
Colin,
Unsure where this fits. I downloaded your database ListboxTooltip_v1.61 Subform Scroll Test.accdb from #27.
When opening frmScrollbar, I get the the uncontrolled scrolling. I keeps this behaviour until I click outside th active Access window. I click anywhere on the taskbar and scrolling stops. If I again click the Access window the scrolling restarts.
The forum is changing a gif to jpg. I'll attach the gif in the zip.
I've tried versions of the gif <1 mb, but still not attaching as a gif??
Last edited by orange; 07-12-2022 at 07:15 AM. Reason: trying to attach gif
Thanks, I'll PM you.
What problem have you found with changing the visibility? It works fine for me if I make the controls invisible as soon as the condition is satisfied (Me.CurrentSectionTop > 0 or whatever) and visible again straight after the requery. The only requirement is that the timer interval should be long enough not to expire until all the painting has finished.
@Orange
That's what I was getting earlier but it fixed itself when I decompiled and rebooted.
I'm unable to explain the cause or why it resolved itself.
If doing that doesn't help, try using the Form_Timer event instead of Form_Current.
Did you also get issues with the OP's earlier version?
@remster
I didn't find problems. I just didn't feel it added anything to the approach having objects appear/disappear repeatedly especially if that interferes with the redraw
I'm more concerned about the uncontrolled scrolling. Perhaps it needs a possible warning for anyone who is an epileptic.
But on my suggestion, objects don't appear/disappear repeatedly. They disappear when you start scrolling and reappear half a second (or whatever) after you stop scrolling.
To take my earlier example, when you scroll from Bobby Adens to Bobson Dugnutt, what you see in the second subform is:
1. Bobby Adens
2. Nothing
3. Bobson Dugnutt
At the moment, you see:
1. Bobby Adens
2. Jerry Aiggens
3. Henry Ancaviglia
4. Donovan Anderson
5. Tom Aquimo
... and so on until ...
149. Bobson Dugnutt
With reference to my last post, try the attached.
__________
EDIT: Ugh, I haven't got it quite right. Watch this space.
__________
EDIT 2: It's fine. I just needed to requery in Form_Load as well. Attachment corrected.
I downloaded and ran the database in #38 and subform is aligned with topmost player. Vertical scroll works and on last "page", clicking the down button move the record selection as expected.
Re sample app in post #38.
Thanks. Yes it works exactly as you describe .... but that's not the behaviour I'm looking for.
I want to scroll through the records and see the output for each
Re #39
Great. I just think it's the tidiest option if you don't want to requery until you've reached your destination.
By the way, the route to madness is to try and replicate the same behaviour using the Up Arrow and Down Arrow, Page Up and Page Down, and Home and End keys. I managed to get something working, but it wasn't at all satisfactory.
Re #40
Oh, then that's fine. I was just throwing it out there for anyone who might find the repeated requerying a problem.
Yes I agree re #41/#43
I'll include the code (commented out) in the sample db when I upload it to my website
Re #42
Agree with that also, I was going around in circles trying to fix the unwanted & uncontrollable scrolling before it 'magically' fixed itself.
Now @orange is getting the same behaviour on my 'fixed' version. Did you download & try that? If not please would you do so & let me know whether or not its OK for you.
Yes, I'm getting the mad scrolling too. I'll look at it this evening.