Results 1 to 2 of 2
  1. #1
    allenjasonbrown@gmail.com is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    44

    Slider Control 6.0 mousedown/mouseup

    I am trying to figure out a way to use Slider Control 6.0 to allow a user to select a range. For example slider would be from 0-1000 and the user can hold shift down and select 200-375.


    I found some code online but it refererences using the slider MouseDown and MouseUp events. When I add my slider to my form I do not get those events for my slider. (I only get on updated, enter, exit, got focus and lost focus).

    Am I missing something?? Is there a better/cooler way I can allow the user to select a range??

    Thanks in advance!!

    This is the code I was looking at.

    Code:
    Private Sub Form_Load()
       sldSelect.SelectRange = True
    End Sub 
    Private Sub sldSelect_MouseDown _
    (Button As Integer, Shift As Integer, _
    x As Single, y As Single)
       If Shift = 1 Then
          sldSelect.SelStart = sldSelect.Value
          ' Set previous SelLength (if any) to 0.
          sldSelect.SelLength = 0
       End If
    End Sub
    Private Sub sldSelect_MouseUp _
    (Button As Integer, Shift As Integer, _
    x As Single, y As Single)
       If Shift = 1 Then
       ' If user selects backwards from a point,
       ' an error will occur.
       On Error Resume Next
       ' Else set SelLength using SelStart and
       ' current value.
          sldSelect.SelLength = _
          sldSelect.Value - sldSelect.SelStart
       Else
          'If user lifts SHIFT key, set SelLength
          ' to 0 (to deselect the SelRange) and exit.
          sldSelect.SelLength = 0
       End If
    End Sub

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Was this the link http://msdn.microsoft.com/en-us/libr...(v=vs.60).aspx? It is for Visual Studio. Access/VBA might not be able to handle this. This is all I can find that addresses issue in Access http://www.access-programmers.co.uk/...d.php?t=200351
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Slider Control
    By Paul H in forum Forms
    Replies: 4
    Last Post: 05-05-2015, 11:17 PM
  2. Replies: 1
    Last Post: 03-01-2012, 10:52 AM
  3. Slider Bar Question
    By Paul H in forum Forms
    Replies: 2
    Last Post: 01-26-2012, 09:11 AM
  4. Replies: 9
    Last Post: 01-19-2012, 03:03 PM
  5. Form level mouseup event not firing
    By Philhoop in forum Forms
    Replies: 3
    Last Post: 07-22-2010, 09:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums