format the field as all lower case. that should drive the all capitals people crazy enough to put the effort into doing it right. how about a function that scans the text for capitals and if the number of capitals it greater than, let's say, 80%, format the whole thing as lower case. otherwise leave it as it is.
is there any way to check if caps lock is on and, if it is, shut it off?
or better yet, if it is on, display a message that says:
HEY YOU! STUPID! SHUT YOUR CAPS LOCK OFF!
(and if they don't, then format as all lower case. or lock the form until they disable the caps lock)
Just got some help.
On your form, create the label Label0
In the form's module enter:
Option Compare Database
Option Explicit
Private Declare Sub GetKeyboardState Lib "user32" (lpKeyState As Any)
Const VK_CAPITAL = &H14
Public Sub CapsOn()
ReDim Keyboardbuffer(256) As Byte
'Array to check capslock
GetKeyboardState Keyboardbuffer(0)
If Keyboardbuffer(VK_CAPITAL) And 1 Then
'CapsLock on ...
Me.Label0.Caption = "HEY YOU! YEAH YOU! TURN OFF YOUR CAPS LOCK!"
Me.Label0.ForeColor = 255
Me.Label0.Visible = True
End If
End Sub
Private Sub Form_Open(Cancel As Integer)
Call CapsOn
End Sub
Perhaps you could make all the controls on the form invisible and run a 10 second timer to give them time to read the message and then close the form.