Field changes to lower case when clicked into. (1 Viewer)

marathonlady

Registered User.
Local time
Today, 04:22
Joined
Jul 10, 2002
Messages
120
I have a form bound to a query. the query is just the table with all fields selected. The JobID field is in the table in all caps, which is how the user wants it displayed. When the form comes up, the jobid is displayed in all caps, but when it is clicked into sometimes the jobid changes to lower case. What is going on. I am using the format of > in the table and forms to force all caps.

Thanks in advance for any help.
 

IMO

Now Known as ___
Local time
Today, 09:22
Joined
Sep 11, 2002
Messages
723
I think the format of > is only for viewing purposes, so if the info within the table was entered in lowercase, that's how it will be viewed when amending. To force all text in tables to be uppercase do the following:

Copy the code below to a new module

Public Sub ALLUPPERCASE()
If IsNull(Screen.ActiveControl)=False Then
Screen.Activecontrol = StrConv(Screen.ActiveControl, vbUpperCase)
End If
End Sub


On the after_Update of the Textbox type the code

ALLUPPERCASE

This will force all input text to uppercase

IMO
 

Knivag

New member
Local time
Today, 18:22
Joined
Nov 30, 2005
Messages
8
I'm trying to understand how to get this to work for a text field on a form, I've tried doing as above but I must be missing something...

I'm also trying to have all text entered into a text field stored and shown as CAPS.

Cheers
 

RuralGuy

AWF VIP
Local time
Today, 02:22
Joined
Jul 2, 2005
Messages
13,826
In the BeforeUpdate event of your TextBox put:
Me.YourControlName = UCase(Me.YourControlName)
...using your control name of course.
 

Users who are viewing this thread

Top Bottom