By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

keypress event

P: n/a
Have an integer field on a form. Have implemented a keypress event such
that '+' will add 1 to the field. In debug mode, this is fine, the value of
the field is increased by 1 ... until the procedure is ended ... and then
the field contains a '+'. KeyPreview has been set to True. What is
missing??

Chuck
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I don't know. Would you mind showing us the procedure?

--
Wayne Morgan
MS Access MVP
"Chuck" <ch*****@acm.org> wrote in message
news:2K********************@comcast.com...
Have an integer field on a form. Have implemented a keypress event such
that '+' will add 1 to the field. In debug mode, this is fine, the value
of the field is increased by 1 ... until the procedure is ended ... and
then the field contains a '+'. KeyPreview has been set to True. What is
missing??

Chuck

Nov 13 '05 #2

P: n/a

"Chuck" <ch*****@acm.org> wrote in message
news:2K********************@comcast.com...
Have an integer field on a form. Have implemented a keypress event such that '+' will add 1 to the field. In debug mode, this is fine, the value of the field is increased by 1 ... until the procedure is ended ... and then the field contains a '+'. KeyPreview has been set to True. What is missing??

Chuck


Maybe I'm just lazy, but someone wrote this already. You can download
it from here...
http://www.mvps.org/access/forms/frm0041.htm

Nov 13 '05 #3

P: n/a

<pi********@hotmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...

"Chuck" <ch*****@acm.org> wrote in message
news:2K********************@comcast.com...
> Have an integer field on a form. Have implemented a keypress event such > that '+' will add 1 to the field. In debug mode, this is fine, the value > of the field is increased by 1 ... until the procedure is ended ... and > then the field contains a '+'. KeyPreview has been set to True. What is > missing??
>
> Chuck
>


Maybe I'm just lazy, but someone wrote this already. You can download
it from here...
http://www.mvps.org/access/forms/frm0041.htm


Piet,

Many thanks. It works great. Now I'll have to study it at length to try
and understand why the simple-minded approach doesn't work. Upon a '+'
keypress, I was trying to set ctl = ctl +1. As I mentioned before, when
single-stepping through it worked fine. The ctl became ctl+1. But when the
procedure terminated, The ctl became a '+'.

Chuck
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.