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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|