A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Reprogram number keys?



 
 
Thread Tools Display Modes
  #1  
Old May 25th, 2004, 08:04 PM
Jerry
external usenet poster
 
Posts: n/a
Default Reprogram number keys?

Is it possible to "reprogram" the keypad keys to input
something other than the assigned number into a field?
For instance, could I fix it to enter "S" when I hit
the "1" key on the keypad? I suspect it would be an
If/then sequence that would "reveal" the "S" after update,
but was wondering if there is a way to make it appear
instantly (i.e. you would never see the "1" on the form,
just the "S" when you hit the "1").

Hope that's not too confusing.

Thanks in advance.
  #2  
Old May 25th, 2004, 11:08 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default Reprogram number keys?

Assuming you're talking about using a form, you should be able to put logic
in the field's KeyPress event along the lines of:

Private Sub MyField_KeyPress(KeyAscii As Integer)

Select Case Chr$(KeyAscii)
Case "1"
KeyAscii = Asc("S")
Case Else
End Select

End Sub

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Jerry" wrote in message
...
Is it possible to "reprogram" the keypad keys to input
something other than the assigned number into a field?
For instance, could I fix it to enter "S" when I hit
the "1" key on the keypad? I suspect it would be an
If/then sequence that would "reveal" the "S" after update,
but was wondering if there is a way to make it appear
instantly (i.e. you would never see the "1" on the form,
just the "S" when you hit the "1").

Hope that's not too confusing.

Thanks in advance.



  #3  
Old May 26th, 2004, 04:39 PM
external usenet poster
 
Posts: n/a
Default Reprogram number keys?


-----Original Message-----
Assuming you're talking about using a form, you should be

able to put logic
in the field's KeyPress event along the lines of:

Private Sub MyField_KeyPress(KeyAscii As Integer)

Select Case Chr$(KeyAscii)
Case "1"
KeyAscii = Asc("S")
Case Else
End Select

End Sub

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Jerry" wrote in

message
...
Is it possible to "reprogram" the keypad keys to input
something other than the assigned number into a field?
For instance, could I fix it to enter "S" when I hit
the "1" key on the keypad? I suspect it would be an
If/then sequence that would "reveal" the "S" after

update,
but was wondering if there is a way to make it appear
instantly (i.e. you would never see the "1" on the form,
just the "S" when you hit the "1").

Hope that's not too confusing.

Thanks in advance.



.


Thanks, Doug, that was exactly what I needed! Works
great! Now, if you happen to visit this post again, I'd
like to know now to "program" the period/delete key on the
keypad to act like the delete key when the NumLock is set
(it will act like the period key when the NumLock is set,
but I don't want that.) Make sense?

I will also post this question separately as a new post,
since I know people don't often check back for responses
to their responses. Maybe you'll catch it there.

Jerry
  #4  
Old May 27th, 2004, 12:22 AM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default Reprogram number keys?

I'm not sure there's any way of distinguishing between the period from the
number pad, and the period from the other part of the key. Unfortunately,
I'm using a laptop at the moment, with no number pad, so I don't have any
way of checking.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


wrote in message
...
Thanks, Doug, that was exactly what I needed! Works
great! Now, if you happen to visit this post again, I'd
like to know now to "program" the period/delete key on the
keypad to act like the delete key when the NumLock is set
(it will act like the period key when the NumLock is set,
but I don't want that.) Make sense?

I will also post this question separately as a new post,
since I know people don't often check back for responses
to their responses. Maybe you'll catch it there.

Jerry



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:36 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.