Scrolling in Memo Field

  • Thread starter Thread starter LD
  • Start date Start date
L

LD

I have a single form with a memo field with a vertical scroll bar.. If I use
the mouse scroll while the curser is in the memo field the next record shows
up. The mouse scrolling does not scroll the Text within the memo field... Is
there a way I can stop the record from scrolling up & only the Vertical
Scroll Bar of the memo field to scroll? I have looked at
www.lebans.com/mousewheelonoff.htm to turn off mouse wheel but that is not
what I want as I want the Vertical Scroll Bar to scroll only... Anyone have
any suggestions????
 
Hi,

I use Stephen Lebans mousewheeloff module and it does as you want - click in
the memo field and the text in the memo field will scroll, but click in any
other field on the form and the form won't scroll to the next record.

Install the module to turn it off and try it.

Anthony

LD wrote:
I have looked at
 
Works Great...
I have had to place Me.Refresh at the end of the code to refresh the form
but after that it works great...

I have also placed on the "On Open" for each form so that the code select
the way I want that specific form to Scroll.

Thanks I appriciate your help!!!!!!!!
 
You'd can write this code in the "On Mouse Wheel" Event of the form that it has a CombBox or MemoBox. The code below uses SendKeys, which is reputed to be flaky (but it generally works OK most of times for most of us!) :)

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
Dim i As Long
Dim s As String
If Me.ActiveControl.Name = "Staff_Details" Then ' >>>> replace with name of Textbox or Memobox
If Count > 0 Then
For i = 1 To Count
s = s & "{DOWN}"
Next i
Else
For i = 1 To -Count
s = s & "{UP}"
Next i
End If
SendKeys s
End If
End Sub

'_____________________________________ By Kasy
 
Back
Top