Solved

MSAccess - Scroll wheel in a Memo field on a form

Posted on 2008-06-25
4
1,922 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

728 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