Field changes to lower case when clicked into.

marathonlady

Registered User.
Local time
Today, 06: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.
 
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
 
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
 
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

Back
Top Bottom