Something like this will do it:
Code:
Private Sub PlusButton_Click()
Me.TrafficCount = Nz(Me.TrafficCount, 0) + 1
End Sub
Code:
Private Sub MinusButton_Click()
If Not IsNull(Me.TrafficCount) And Me.TrafficCount <> 0 Then
Me.TrafficCount = Me.TrafficCount - 1
End If
End Sub
If you're pressed for space on your Form, there's also an ActiveX Control named UpDown Control (at least that's the name in 2007; in earlier versions it was called a Spinbutton Control) that is designed for this. That code would be like this:
Code:
Private Sub TrafficUpDown_UpClick()
Me.TrafficCount = Nz(Me.TrafficCount, 0) + 1
End Sub
Code:
Private Sub TrafficUpDown_DownClick()
If Not IsNull(Me.TrafficCount) And Me.TrafficCount <> 0 Then
Me.TrafficCount = Me.TrafficCount - 1
End If
End Sub
But using larger, custom buttons with the first two code samples above may be better, given that this is being used on a handheld device.
Linq ;0)>