I have added a slider control (Microsoft Slider Control, version 6.0) to my form and added a text box to display the value of the slider. The slider will be used to select ratings for questions.
I am unable to get the textbox to show the value of the slider on the form. If I move the slider and exit the form, the correct value shows in the table. How do I get the value to show in the text box before closing the form? My code is below.
[code]
Option Compare Database
Private Sub Form_Open(Cancel As Integer)
If Me.txtRating.Value <> Null Then
Me.Slider1.Value = Me.txtRating.Value
Else
Me.Slider1.Value = 0
End If
End Sub
Private Sub Slider1_Exit(Cancel As Integer)
Me.txtRating.Value = Me.Slider1.Value
End Sub
Private Sub Slider1_Updated(Code As Integer)
Me.txtRating = Me.Slider1
End Sub
Private Sub txtRating_AfterUpdate()
Me.txtRating.Value = Me.Slider1.Value
End Sub
[code].