Solved

MSAccess - Scroll wheel in a Memo field on a form

Posted on 2008-06-25
4
1,816 Views
Last Modified: 2009-12-22
A user asked about the possibility of adding the capability to use the scroll wheel to scroll within a Memo field on a datasheet view/form view.

- On the Datasheet, the scroll wheel just scrolls thru the records.  I suppose I could disable the scroll wheel on the mouseover event of the memo field.

- On the form, scroll wheel does nothing in a Memo box.

I couldn't find a quick answer, but thought someone might have run into a similar request.

Any sugestions?

Thanks!

0
Comment
Question by:markp99
4 Comments
 
LVL 27

Accepted Solution

by:
jjafferr earned 500 total points
ID: 21866214
Access cannot turn off the mouse wheel control natively, you have to usea 3rd party tool like:
http://www.lebans.com/mousewheelonoff.htm

as far as scrolling through the memo field, I don't think it is possible,
but you can put the following code "On Double click" of the memo field:

    'zoom to see the rest of the data inside the textbox
    DoCmd.RunCommand acCmdZoomBox

this will open the memo field in a bigger window.

jaffer
0
 
LVL 4

Expert Comment

by:oldmanbim
ID: 22710130
Jaffer's right.

However, here is quick fix to this if you're not to particular about the "elegance" of your solution.  

You'll need to set the On Mouse Wheel event of your form to "[Event Procedure]"
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)

    ' A multiplier for Count, which is how far to jump (jump = "scroll")

    ' A good estimate for this is 2x your text box width in inches

    Const DELTA As Integer = 8

    Dim NewPos As Long
 

    ' The tag "UseWheel" marks a control as scrollable

    If Screen.ActiveControl.Tag <> "UseWheel" Then Exit Sub
 

    ' Do the scroll

    With Screen.ActiveControl

        ' Make sure there is no selected text

        .SelLength = 0
 

        ' Get the new position

        NewPos = .SelStart + Count * DELTA
 

        ' Make sure it's not 0 and set SelStart

        If NewPos < 0 Then .SelStart = 0 Else .SelStart = NewPos
 

    End With
 

End Sub

Open in new window

0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
View vs Edit mode enhancements 12 40
Adding icons to a custom, shortcut menu function 6 41
Access Runtime 2010 Error 17 29
Newbie needs help printing from a form. 10 19
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now