LCase and Shift Key

S

skchth

I am using the LCase argument in a memo box which put all text in lower case.
However, sometimes the text include a name. How will I be able to keep the
shift key enabled with the LCase argument.
(I need to type text in a memo box, want everything in lower case, except
the first letter of names).

Any help would be appreciated.
 
K

Ken Snell \(MVP\)

How's the form going to know when the shift key is being used for the first
letter of a name as opposed to any other word? If you have LCase in the
programming that then converts all the text to lower case, you then would
have to run programming to "find" names and to change the first letter of
each to a capital letter -- but what distinguishes a name from another word?

You can have the form trap the use of the shift key and either allow it or
cancel (swallow) it, but again -- how will the form know when the person is
beginnning to type the first letter of a name as opposed to another word?
 
S

skchth

First of all thank you for your quick response. It is great for a beginner
like me to get the help from experts like you via this discussion group.
Could not do without it.

I was hoping that there is a code that will keep the shift key enabled with
the LCase argument. I have
KeyAscii = Asc(LCase(Chr(KeyAscii))) in the on key press event and
autocorrect turned on. This will put the text in lower case and capitalize
the first letter of each sentence. However it will not capitalize a word when
the Shift key is used because, as you say, the form will not know if it is a
name or not.
Is there another way to ensure that text is in lower case in when the user
leaves the Caps Lock on and at the same time still be able to use the Shift
key?

Thanks for your help.
 
K

Ken Snell \(MVP\)

Perhaps it would be better if your code checks to see if the Caps Lock key
is on, and turns it off.

See these web pages for code that will detect the setting:
http://cuinl.tripod.com/Tips/Checkcapslock.htm

http://groups.google.com/group/micr...b483616d9f8/21c8a9ec18a2ef1e#21c8a9ec18a2ef1e


These sites have free code for setting the Caps Lock on or off:
http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=36

http://msdn.microsoft.com/library/d...en-us/dnvbadev/html/creatingkeyboardclass.asp

http://www.freevbcode.com/ShowCode.asp?ID=1004


A Google search turned up this page for a software that will let you set the
key's setting:
http://www.soft45.com/details/Smart-Keys-15776.htm
 
S

skchth

Thank you so much for your advise and pointing me in the right direction. I
did manage to disable the Caps lock key when I type text in the memo box. Now
everything is in lowercase and I can still capitalize names with the Shift
key.


Bert.
 
Top