ACTIVEX SPINCONTROL in ACCESS97 AND WINXPhomeedition

J

Jan Eikeland

hello there.
My spincontrol wont spin, it only inc/dec evertytime I hit one of the
spinbuttons.
It wont obey the Min and Max either
Is there anything wrong with code below ?
thank You.

Private Sub UserForm_Initialize()
SpinButton1.Min = 1
SpinButton1.Max = 52
SpinButton1.Delay = 50
EventCount = 1
SpinButton1.Value = 1
Tekst184.SetFocus
Tekst184.Text = EventCount
End Sub
Private Sub SpinButton1_SpinDown()
EventCount = EventCount - 1
Tekst184.SetFocus
Tekst184.Text = EventCount
End Sub
Private Sub SpinButton1_SpinUp()
EventCount = EventCount + 1
Tekst184.SetFocus
Tekst184.Text = EventCount
End Sub
 
J

Jan Eikeland

Ive fixed the max/min showing in textboxs , but still no spinning effect.

Private Sub SpinButton1_SpinDown()
EventCount = EventCount - 1
Select Case EventCount
Case 0
EventCount = 1
SpinButton1.Value = 1
End Select
Tekst184.SetFocus
Tekst184.Text = EventCount
End Sub

Private Sub SpinButton1_SpinUp()
EventCount = EventCount + 1
Select Case EventCount
Case 53
EventCount = 1
SpinButton1.Value = 1
End Select
Tekst184.SetFocus
Tekst184.Text = EventCount
End Sub
 
J

Jan Eikeland

Place the code in Form_Open and away with some code fixes min/max problems
but still not spinning.

I would think as having leftmousedown as a conditon for spin up and down,
but dont know where to put it in my form or properties for the spin control.

reg jan

Private Sub Form_Open(Cancel As Integer)
SpinButton1.Min = 1
SpinButton1.Max = 52
SpinButton1.Delay = 500
Tekst184.SetFocus
Tekst184.Text = SpinButton1.Value
End Sub

Private Sub SpinButton1_SpinDown()
Tekst184.SetFocus
Tekst184.Text = SpinButton1.Value
End Sub

Private Sub SpinButton1_SpinUp()
Tekst184.SetFocus
Tekst184.Text = SpinButton1.Value
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top