Spin Controls in MS Access 97

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a spin controls in MS Access 97? I would like to setup a spin
control for user to increase or decrease an integer value.
 
Charles,

There are a number of third party spin controls available. For example,
see the Total Access Components collection at www.fmsinc.com.

However, it is fairly easy to roll your own. Just use a textbox, and a
couple of suitably positioned command buttons with arrow icons on them.
Here is an example of the code you can use on the "decrease" button,
which assumess 0 is the lowest allowable value...

Private Sub DecreaseIt_Click()
Me.YourTextbox = Me.YourTextbox - 1
Me.YourTextbox.SetFocus
If Me.YourTextbox = 0 Then
Me.DecreaseIt.Enabled = False
End If
End Sub
 
Back
Top