B
Byron
Using Windows Vista & Access 2007
The following is taken from: Allen Browne's tips for Microsoft Access
Rolling dates by pressing "+" or "-"
Some commercial programs (Tracker, Quicken, etc) allow the user to press "+"
or "-" to increment or decrement a date without the hassle of selecting the
day part of the field and entering a new value. This is especially useful in
fields where the default date offered could be a day or two different from
the date desired.
To provide this functionality in Access, attach this Event Procedure to the
KeyPress event of your control.
Select Case KeyAscii
Case 43 ' Plus key
KeyAscii = 0
Screen.ActiveControl = Screen.ActiveControl + 1
Case 45 ' Minus key
KeyAscii = 0
Screen.ActiveControl = Screen.ActiveControl - 1
End Select
I've followed the instructions above, but I get an error at the "KeyAscii."
The Error Message says that the Variable KeyAscii not declared.
Does this indicate a missing reference, and if so which one; or is there
something else I'm missing?
Thanks for any and all assistance.
Byron
The following is taken from: Allen Browne's tips for Microsoft Access
Rolling dates by pressing "+" or "-"
Some commercial programs (Tracker, Quicken, etc) allow the user to press "+"
or "-" to increment or decrement a date without the hassle of selecting the
day part of the field and entering a new value. This is especially useful in
fields where the default date offered could be a day or two different from
the date desired.
To provide this functionality in Access, attach this Event Procedure to the
KeyPress event of your control.
Select Case KeyAscii
Case 43 ' Plus key
KeyAscii = 0
Screen.ActiveControl = Screen.ActiveControl + 1
Case 45 ' Minus key
KeyAscii = 0
Screen.ActiveControl = Screen.ActiveControl - 1
End Select
I've followed the instructions above, but I get an error at the "KeyAscii."
The Error Message says that the Variable KeyAscii not declared.
Does this indicate a missing reference, and if so which one; or is there
something else I'm missing?
Thanks for any and all assistance.
Byron