Hi Rich
Interesting idea - I'd never thought to try it, until I read your question,
that is
The following code seems to work:
===================================
Dim fRecordCountChanged As Boolean
Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer)
fRecordCountChanged = True
End Sub
Private Sub Form_Current()
If fRecordCountChanged Then
Slider1.Max = Me.Recordset.RecordCount
fRecordCountChanged = False
End If
Slider1.Value = Me.CurrentRecord
End Sub
Private Sub Form_Load()
Slider1.Min = 1
Slider1.Max = Me.Recordset.RecordCount
End Sub
Private Sub Slider1_Scroll()
Dim lMove As Long
lMove = Slider1.Value - Me.CurrentRecord
If lMove <> 0 Then
With Me.RecordsetClone
.Move lMove, Me.Bookmark
Me.Bookmark = .Bookmark
End With
End If
End Sub
====================================
Basically it does the following:
1. Sets the Min and Max of the slider when the form opens.
2. Resets the Max after a filter is applied. (This should probably also be
done after inserting or deleting records)
3. Sets the slider value to match the current record if the record is
changed by a means other than the slider.
4. If the slider is moved, calculate the distance moved and scroll the
recordset accordingly.
I need to place a slider control that when i move it up or down it will go
thru the records forward and previous. Does anyone have a process/code
[quoted text clipped - 3 lines]