View Full Version : "+" and "-" keys for dates


Danielf
02-01-2001, 04:17 AM
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

pdx_man
02-01-2001, 08:29 AM
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