Ascii and Sendkeys

MarionD

Registered User.
Local time
Today, 22:03
Joined
Oct 10, 2000
Messages
425
Hi all,

I have searched the Forum but can't seem to find what I Need.

I have a Combo box which contains a set of numbers divided by "."
e.g.: 1.342567.24433

When looking for a certain code, I would like to use the number pad to enter the first few e.g. 1.34 to move to the Position. In Previous Versions of Access I had a function on the key

If KeyAscii = 44 Then
DoCmd.CancelEvent 'stop the comma keypress being updated
SendKeys ".", True 'put a full stop in the field
End If
This worked fine, but in Accees 7 and up, it turns off the number lock.

Is there an alternative to sendkeys to achieve the above or a way of directly turning the number lock on again?

I would really appreciate any help.
Thanks
Marion
 
Need a better example. How do you, or better still how does the reader know to interpret this string into 1.34?
There had to be more code than this; please show the complete code. Also, who wrote the code?
Code:
If KeyAscii = 44 Then
DoCmd.CancelEvent 'stop the comma keypress being updated
SendKeys ".", True 'put a full stop in the field
End If
 
Thanks for the answer.
I wrote the code and it is really just These couple of lines on the "on key" of the Combo box. These are Serial numbers and the user knows that they either start with 1. or 2. or 3.

All I want is to be able to do is :
If the comma on the numerpad of the Keyboard is pressed
then cancel the keystroke and send a full stop instead.

so if they enter 1, it is changes to 1. automatically

Hope that is clearer.
 

Users who are viewing this thread

Back
Top Bottom