How to disable Small alphabet letters on the form

G

Guest

I know the code to disable the small alphabet letters on form. I have to
write on each form indiviually. Is there any method that i can set the code
globally when the mdb is started the small alphabet letter is disabled and
the user can only type the capital letter on the all the Forms

Please advise.

Regards

Irshad
 
B

Bob Quintal

=?Utf-8?B?SXJzaGFkIEFsYW0=?=
I know the code to disable the small alphabet letters on form.
I have to write on each form indiviually. Is there any method
that i can set the code globally when the mdb is started the
small alphabet letter is disabled and the user can only type
the capital letter on the all the Forms

Please advise.

Regards

Irshad

NO, THERE IS NO SAFE METHOD TO SET ALL CAPITAL LETTERS AT THE
DATABASE LEVEL. ALSO IT IS DIFFICULT FOR USERS AND ANALYSTS TO
READ REPORTS WHERE ALL THE TEXT IS IN CAPITAL LETTERS. IT MAY BE
NECESSARY TO USE ALL CAPITALS IN ONE OR TWO FIELDS, BUT IS VERY
RUDE TO USE EVERYWHERE.

:p
 
T

tina

when i have certain fields in a table where i want the text stored as "all
capitals", i add a custom function to a standard module, as

Public Function isUpperCase()

On Error Resume Next

If Not IsNull(Screen.ActiveControl) Then
Screen.ActiveControl = StrConv(Screen.ActiveControl, _
vbUpperCase)
End If

End Function

then, in the form bound to that table, i call the function directly from the
AfterUpdate Event property line of the controls bound to those text fields,
as

=isUpperCase()

yes, the code has to be added to each control where you want the text
converted to all capitals - but you can open the form in Design view, select
all the controls you want to add the code to *at the same time*, and enter
the function call on the event property line once, while you have multiple
controls selected. so at least it's faster than adding code to each control
individually.

hth
 
M

missinglinq via AccessMonster.com

What code are you speaking of when you say you know how to disable small
alphabetical characters?

I don't know if this will suit your purposes or not. I have clients that want
all caps, for whatever reasons. I use the following, which doesn't prevent
them from using lower case, but sets the CapsLock when the first form is run
then turns it off when the last form is closed.

In a new standard module place this code:

'Windows API/Global Declarations for :CapLock
'*********************************************
Public Const VK_CAPLOCK = &H14

Public Type KeyboardBytes
kbByte(0 To 255) As Byte
End Type
Public kbArray As KeyboardBytes

Public Declare Function GetKeyState Lib "user32" _
(ByVal nVirtKey As Long) As Long
Public Declare Function GetKeyboardState Lib "user32" _
(kbArray As KeyboardBytes) As Long
Public Declare Function SetKeyboardState Lib "user32" _
(kbArray As KeyboardBytes) As Long

When prompted name the module something like ControlCapsLock

In the On_Load sub of the first form in your db that is used place this code:

'Turn Capslock On
GetKeyboardState kbArray
kbArray.kbByte(VK_CAPLOCK) = 1
SetKeyboardState kbArray

Then last thing before closing your db (in the Unload event) place this code:

'Turn Capslock OFF
GetKeyboardState kbArray
kbArray.kbByte(VK_CAPLOCK) = 0
SetKeyboardState kbArray
 
G

Guest

Thanks for your answer.

But my need is to disable the small letter completely. Not to give user any
option to type small letter. Therefore , I am looking for a code to disable
small letters completely. Just I wanted to avoid the code typing in each form
to do that. If I can get the code which can be put to work globally. Please
advise

Regards
 
M

missinglinq via AccessMonster.com

Then the answer is No!

Irshad said:
Thanks for your answer.

But my need is to disable the small letter completely. Not to give user any
option to type small letter. Therefore , I am looking for a code to disable
small letters completely. Just I wanted to avoid the code typing in each form
to do that. If I can get the code which can be put to work globally. Please
advise

Regards
What code are you speaking of when you say you know how to disable small
alphabetical characters?
[quoted text clipped - 37 lines]
kbArray.kbByte(VK_CAPLOCK) = 0
SetKeyboardState kbArray

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
G

gsnidow via AccessMonster.com

Put the following behind the On Keypress event of all the fields where you
want all caps

KeyAscii = Asc(UCase(Chr(KeyAscii)))

Irshad said:
Thanks for your answer.

But my need is to disable the small letter completely. Not to give user any
option to type small letter. Therefore , I am looking for a code to disable
small letters completely. Just I wanted to avoid the code typing in each form
to do that. If I can get the code which can be put to work globally. Please
advise

Regards
What code are you speaking of when you say you know how to disable small
alphabetical characters?
[quoted text clipped - 37 lines]
kbArray.kbByte(VK_CAPLOCK) = 0
SetKeyboardState kbArray
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top