Re: Switching between CapsLock on and off



"Dirk Goossens" <dirkhil@xxxxxxxxx> wrote in message
news:49870894$0$2862$ba620e4c@xxxxxxxxxxxxxxxxx
Hi

When entering data in a form, I should like to have my CapsLock-key
automatic on in certain fields.
When leaving the field, CapsLock-key back off.

Can somebody help me?

Thanks!


In a strange way you've asked the wrong question, and got some great advice!

In other words if your goal is to slow down your car, and for some reason
you think the best way to do that is to let the air out of the tires, then
you might go into an automobile forUM and ask questions on how to let air
out of tires. You'll likely get some great Suggestions on how to let the air
out of your tires. The problem is you're not really try to let air out of
your of your tires, you try to slow the car down. A MUCH better way would be
to press on the breaks to slow the car down!

While it is possible through special windows programming to manipulate the
caps lock key on a computer consule, it is probably a bad idea because once
you flip into caps lock the person might type a few characters, and then
bump the caps lock key and you're now back into typing in lower case
characters again. In fact in many cases the user may not bump the key by
accident, but may on purpose try to change the setting of the caps lock key
again. Thus, your next question would be how you disabled the person
manipulating the caps lock key once you set it to a particular way! This is
going down the wrong garden path and will create all kinds of problems for
you. Not only is this the wrong approach, but I get pretty angry when
someone's software starts messing around with my caps lock, or nun lock key
or any other settings I prefer to have MY WAY for myself.

In your situation you have a particular need for a particular field data to
be entered in a particular format. Access has MANY MANY tools for solving
these types of data input problems. Access has a input mask system designed
for this problem. In other words we can set up a text box on a form that has
restrictions for lower case, for upper case, for numbers ONLY, or whatever
it may be for your given situation. In other words you can even build custom
formats for things like phone numbers, Social security Numbers etc. So you
have a lot of possibilities here and none of these possibilities require you
to write any code on your behalf. This is exactly why MS access is such a
powerful tool for data entery, and it it's exactly the kind of thing that is
built into access.

In your case you want a field in which the data is all uppper case. Simply
place into the input mask settings for that text box the following

?????????????

Simply put as many question marks as the legal maximum number of charatyers
you want to allow for that text box/field. That's all you have to do here.
There is absolutely no coding or any other things need be done for you to
accomplish this goal. In fact while your cursor is inside of the input mask
property sheet setting for that particular control, I suggest that you hit
the help button (f1) and you'll see a wonderful explanation of all kinds of
input masks that you can use from things like social security numbers, phone
numbers, postal codes, or whatever you want.

So I can't stress how the other posters here honestly tried to help you, but
the problem lies in that your actually asking the wrong question. The
question and answer you seek is not to ask how to manipulate the caps lock
key, but in fact how to prevent or force your data formats to be of a
particular format.

By using an input mask you can force the input to be all numbers, all upper
case, all lowercase, and even forced names to have the first letter a
capital, and the rest of the input can be in lowercase.



--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@xxxxxxx


.



Relevant Pages

  • Re: Switching between CapsLock on and off
    ... When entering data in a form, I should like to have my CapsLock-key ... caps lock key on a computer consule, it is probably a bad idea because ... then bump the caps lock key and you're now back into typing in lower case ... Access has a input mask system ...
    (comp.databases.ms-access)
  • Re: Switching between CapsLock on and off
    ... When entering data in a form, I should like to have my CapsLock-key automatic on in certain fields. ... While it is possible through special windows programming to manipulate the caps lock key on a computer consule, it is probably a bad idea because once you flip into caps lock the person might type a few characters, and then bump the caps lock key and you're now back into typing in lower case characters again. ... Access has a input mask system designed for this problem. ... The question and answer you seek is not to ask how to manipulate the caps lock key, but in fact how to prevent or force your data formats to be of a particular format. ...
    (comp.databases.ms-access)
  • Re: Switching between CapsLock on and off
    ... When entering data in a form, I should like to have my CapsLock-key automatic on in certain fields. ... While it is possible through special windows programming to manipulate the caps lock key on a computer consule, it is probably a bad idea because once you flip into caps lock the person might type a few characters, and then bump the caps lock key and you're now back into typing in lower case characters again. ... Access has a input mask system designed for this problem. ... The question and answer you seek is not to ask how to manipulate the caps lock key, but in fact how to prevent or force your data formats to be of a particular format. ...
    (comp.databases.ms-access)
  • Re: Trigger CAPS LOCK ON When Wk Bk is Opened?
    ... uses a simple sub to control the setting of the caps lock key through ... Private Declare Function GetKeyboardState Lib "user32" _ ... Public Sub ToggleCapsLock ...
    (microsoft.public.excel.programming)
  • Re: How can I disable the caps lock key? Please explain in detail.
    ... There may be a way to disable the Caps Lock key, ... there is an option to use the Shift key to turn Caps Lock off, ... be sure that you have "Correct accidental usage of cAPS LOCK key" ... The proble is caused in large part by ...
    (microsoft.public.word.docmanagement)