"+" and "-" keys for dates

Danielf

Registered User.
Local time
Today, 23:50
Joined
Feb 21, 2000
Messages
103
I have a textbox with short date as format
and today as default date.
I would like, when the focus is on this textbox using the plus sign (+) to increase the date by one or using the
minus sign (-) to decrease the date by one.

Thanks for help

Daniel
 
Use the on change event for that control

Private Sub Field1_Change()

If Me.Field1.Text = "+" Then
Me.Field1.Value = Me.Field1.Value + 1
ElseIf Me.Field1.Text = "-" Then
Me.Field1.Value = Me.Field1.Value - 1
End If

End Sub
 

Users who are viewing this thread

Back
Top Bottom