Talk About Network

Google





Software > Access Forms > Rolling dates b...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 44673 of 46786
Post > Topic >>

Rolling dates by pressing "+" or "-"

by =?Utf-8?B?Qnlyb24=?= <Byron@[EMAIL PROTECTED] > Aug 8, 2008 at 08:41 AM

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
 




 5 Posts in Topic:
Rolling dates by pressing "+" or "-"
=?Utf-8?B?Qnlyb24=?= <  2008-08-08 08:41:02 
Re: Rolling dates by pressing "+" or "-"
"Ken Snell \(MVP\)&q  2008-08-08 12:26:55 
Re: Rolling dates by pressing "+" or "-"
=?Utf-8?B?Qnlyb24=?= <  2008-08-08 09:39:01 
Re: Rolling dates by pressing "+" or "-"
"Linq Adams via Acce  2008-08-08 17:50:13 
Re: Rolling dates by pressing "+" or "-"
=?Utf-8?B?Qnlyb24=?= <  2008-08-08 12:16:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Fri Jan 9 15:53:34 PST 2009.