Mouse Wheel Scroll through records not working (1 Viewer)

bignose2

Registered User.
Local time
Today, 13:24
Joined
May 2, 2010
Messages
219
Hi,

Office 365, access 2016.

Been using scroll wheel for years to move through records in numerous continuous forms.

Just this evening at some point this stopped working.
Fine in other office programs, excel, word etc & browsers & everything so mouse OK.

Had above office for over a year, always worked. Despite what I read now, saying that 2007 & 2010 it is disabled & you need code.

I had 2007 before this 2016 and database in 2007 format and that worked also.

I can sort of understand if it was disabled but how has it continued to work 6 years after it said not & why just now.
Although I have just noticed it says office 365 was installed TODAY, so I guess an upgrade that I did not noticed happened.

Is this is the case?

Is a pain as I have a lot for databases & use this A LOT, almost essential.
I can of course code but a lot of work & just seems so unnecessary, never had any problems.

Also just tested code and of course only moves 1 record at a time (might be able to code more but suspect run into EOF issues) anyway before would scroll 3 lines (or whatever in mouse setting so could scroll through 100 records in seconds) So far really hate this.

Thanks I/A for any advise/similar experience?
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 13:24
Joined
Jan 14, 2017
Messages
18,219
Mouse wheel still works for me in Access 2016
AFAIK its up to date - Office 365 Version 1707 Build 8326.2073 (Click to run)

HTH
 

bignose2

Registered User.
Local time
Today, 13:24
Joined
May 2, 2010
Messages
219
Hi,

Thanks for the info.

Mine was Build 8326.2073 but think must have been updated at that time & I know I had done a restart yesterday evening around the time I noticed it had gone strange.

I have just restored back to a few days ago (why is there only 1 restore point in W10?, I have plenty of gb's allocated)

All back to before, mouse scrolling OK. It does say however build .2013 so either gone back or just says so.

I uses generic MS drivers & nothing changed there.

I suspect but hope not that when it re-updates the same may happen, will see.

Would like to be prepared if it does & not keen on code fix as scrolls slowly and perhaps even get issues later on as it is moving along the records whereas before it stayed put.

With the MS info that this was removed in 2007 & later is that actually referring to single forms and NOT continuous column forms? so my belief earlier that this as deliberate was wrong anyway.

Would be good to know if there is no way this should stop working.
 

Andystone

New member
Local time
Today, 14:24
Joined
Nov 5, 2012
Messages
2
Hi! I have got the same problem with my Access 2016 and continuous forms. It started today.
I also have Access 2010 on my computer, and there scrolling works fine.
 

bignose2

Registered User.
Local time
Today, 13:24
Joined
May 2, 2010
Messages
219
Really Odd it should just do it now without any warning.

My win 10 system restore took me back to ...2103 and all working now.
Office update says I am up to date so don't know when/if it will take me back to 8326.2073 but I guess at some point.

It did work exactly as described in MS advise about it being disabled, Datasheet view still allows for scrolling & every other program has normal behaviour.

My initial reaction to using the code was not good but actually now I am OK'ish with it but early days. Does not seem to scroll quite as fast but still not bad & perhaps actually being on that record could alter be useful.

Fortunately It is just me & have all the source code & always fiddlying but could be a real pain if this is distributed or someone does not code anymore!!



The code below from MS does work & bit happier with it now if required later on.

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)

If Not Me.Dirty Then

If (Count < 0) And (Me.CurrentRecord > 1) Then

DoCmd.GoToRecord , , acPrevious

ElseIf (Count > 0) And (Me.CurrentRecord <= Me.Recordset.RecordCount) Then

DoCmd.GoToRecord , , acNext

End If

Else

MsgBox "The record has changed. Save the current record before moving to another record."

End If

End Sub
 

Andystone

New member
Local time
Today, 14:24
Joined
Nov 5, 2012
Messages
2
I tried your code, and it works perfect for me. So that was the solution I needed for this odd problem. Had to put on an On Error handling, because I go error in then end of scrolling.


Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
On Error GoTo MouseWheel_Error
If Not Me.Dirty Then
If (Count < 0) And (Me.CurrentRecord > 1) Then
DoCmd.GoToRecord , , acPrevious
ElseIf (Count > 0) And (Me.CurrentRecord <= Me.Recordset.RecordCount) Then
DoCmd.GoToRecord , , acNext
End If
Else
MsgBox "The record has changed. Save the current record before moving to another record."
End If
Exit Sub
MouseWheel_Error:
Exit Sub
End Sub
 

static

Registered User.
Local time
Today, 13:24
Joined
Nov 2, 2015
Messages
823
before would scroll 3 lines (or whatever in mouse setting so could scroll through 100 records in seconds) So far really hate this.

Count is the number of lines to scroll from settings. So...

Code:
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
On Error GoTo eHndl
    For i = 1 To Abs(Count)
        DoCmd.GoToRecord , , IIf(Count > 0, acNext, acPrevious)
    Next
eHndl:
    Err.Clear
End Sub
 

bignose2

Registered User.
Local time
Today, 13:24
Joined
May 2, 2010
Messages
219
Many thanks for that, I had wondered if there would be a way to code but my initial feeling was it would error if trying to jump more than 1 record past eof or bof but of course would simply be caught via error handling. I also did not realise the Count picked up the mouse wheel count so well.
Thanks again, although system restore has taken me back to pre-no scroll I think I will always code so if/when next update does it again.
You code also looks better, quicker & cleaner than the MS example.

I did add at the begining
If Count = 3 Then Count = 1
If Count = -3 Then Count = -1
(my mouse is set to 3 lines on the control panel/mouse settings)
so if minimal mouse movement it can go one record at a time, which could be handy
 
Last edited:

AccessBlaster

Registered User.
Local time
Today, 05:24
Joined
May 22, 2010
Messages
5,948
Occasionally a database becomes un compiled. Something strange happens like "cannot go to last record". Take a look at the compile tab. After a quick compile, maybe a compact the little gremlins seem to go back into the shadows for a bit.
 

static

Registered User.
Local time
Today, 13:24
Joined
Nov 2, 2015
Messages
823
I did add at the begining
If Count = 3 Then Count = 1
If Count = -3 Then Count = -1
(my mouse is set to 3 lines on the control panel/mouse settings)
so if minimal mouse movement it can go one record at a time, which could be handy

You could hold a key while scrolling.
CTRL scrolls one record, Shift scrolls the Windows setting, no CTRL or Shift works as normal.

Code:
Dim ctlkey As Boolean
Dim shftkey As Boolean

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    ctlkey = KeyCode = 17
    shftkey = KeyCode = 16
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = 17 Then ctlkey = False
    If KeyCode = 16 Then shftkey = False
End Sub

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
On Error GoTo eHndl
    If Not (ctlkey Or shftkey) Then Exit Sub
    If shftkey Then
        For i = 1 To Abs(Count)
            DoCmd.GoToRecord , , IIf(Count > 0, acNext, acPrevious)
        Next
    Else
        DoCmd.GoToRecord , , IIf(Count > 0, acNext, acPrevious)
    End If
eHndl:
    Err.Clear
End Sub

Private Sub Form_Open(Cancel As Integer)
    Me.KeyPreview = True
End Sub
 

ikellner

New member
Local time
Today, 05:24
Joined
Sep 1, 2017
Messages
2
Hi,

Office 365, access 2016.

Been using scroll wheel for years to move through records in numerous continuous forms.

Just this evening at some point this stopped working.
Fine in other office programs, excel, word etc & browsers & everything so mouse OK.

Had above office for over a year, always worked. Despite what I read now, saying that 2007 & 2010 it is disabled & you need code.

I had 2007 before this 2016 and database in 2007 format and that worked also.

I can sort of understand if it was disabled but how has it continued to work 6 years after it said not & why just now.
Although I have just noticed it says office 365 was installed TODAY, so I guess an upgrade that I did not noticed happened.

Is this is the case?

Is a pain as I have a lot for databases & use this A LOT, almost essential.
I can of course code but a lot of work & just seems so unnecessary, never had any problems.

Also just tested code and of course only moves 1 record at a time (might be able to code more but suspect run into EOF issues) anyway before would scroll 3 lines (or whatever in mouse setting so could scroll through 100 records in seconds) So far really hate this.

Thanks I/A for any advise/similar experience?

me too is sto pworking
 

Tieval

Still Clueless
Local time
Today, 13:24
Joined
Jun 26, 2015
Messages
475
Tried this and it works fine except for one thing. I have to set a form to allow additions or it will scroll normally all the way to the last record and then error out.
 

Tieval

Still Clueless
Local time
Today, 13:24
Joined
Jun 26, 2015
Messages
475
Just to demonstrate the database attached errors out.
 

Attachments

  • Database1.accdb
    484 KB · Views: 257

AccessBlaster

Registered User.
Local time
Today, 05:24
Joined
May 22, 2010
Messages
5,948
You may have to trap the error before
Code:
DoCmd.GoToRecord , , acNext
 

Tieval

Still Clueless
Local time
Today, 13:24
Joined
Jun 26, 2015
Messages
475
Many thanks, I was aware I could error trap it but still cannot see a good reason for it to error. It's sometimes not a good idea to think too deeply about oddities in Microsoft:D
 

bignose2

Registered User.
Local time
Today, 13:24
Joined
May 2, 2010
Messages
219
What I have just noticed is the the scroll bar on the side does not work anymore.

Click on box with mouse (not using wheel at all) and drag down.
The little box moves & stays there, saying record 500 of 1000 etc. but the main window does not move. The second I scroll with the mouse or using << >> it jumps right back to where I was before e.g. 1st record.

I am so use to using the wheel mouse I had not noticed & does not bother me too much but though I would see what others are seeing.

It does this on databases that I have not added the code too, so nothing to do with that.

Really is buggy! Office 365 & up to date.

If you use the << >> at bottom is goes through one by one but you can't drag quickly as before. really odd.
You can go to a specific number using the bottom box if desperate.

I now quite like using the mouse wheel code and actually benefits sometimes but I still finding databases I have made that need updating so ongoing.

Anyone else with this NEW odd behaviour.
 

Tieval

Still Clueless
Local time
Today, 13:24
Joined
Jun 26, 2015
Messages
475
Yes, mine is the same, but if you click in the gaps above and below the scroll bar it will move quickly rather than using the wheel, one record at a time, and getting a sore finger.
 

AccessBlaster

Registered User.
Local time
Today, 05:24
Joined
May 22, 2010
Messages
5,948
I think part of the issue, you have a DoCmd.GoToRecord , , acNext without a record. You reached the bottom of the record source with your continuous form, there are no more records. Just my thoughts.
 

Users who are viewing this thread

Top Bottom