|
-
May 16th, 2003, 04:51 PM
#1
Thread Starter
Frenzied Member
Using KeyPress to compare KeyAscii Values
Need assistance in using the KeyPress Sub to translate a Carriage Return and a Space into a different character.
What I am trying to accomplish is when a person hits Carriage Return in a text field, it converts it into \n and when they hit space it converts it into _ .
I understand I need to use
Private Sub Form_KeyPress (KeyAscii as Integer)
If KeyAscii = Asc (13) (I assume this is right for a CR?)
Then KeyAscii = Asc (92) & Asc (110) (Hoping this produces a \n)
But for some reason, it wont recognize Asc (13) as a carriage return. I even tried Asc ("13") but that doesnt seem to work either.
Any help would be appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|