Converting to ALL Caps on a form

hansnyc

Registered User.
Local time
Today, 09:25
Joined
Apr 12, 2007
Messages
50
Hi
I aware now of the > sign in the format properties of a txt box on my report so it will print data on my form in all caps.
What I am looking for is for a code to put on my form that when I click save it converts my typed data into all caps onto the database.
is it possible?
I'm looking for a code that wold convert all controls on the form at once
 
They'll be people telling you not to do this, asking why you're doing this, etc. My experience is that some users simply prefer this feature. I suspect it goes back to previous software they used that had the feature and they're simply comfortable with it. Here's one way to do this:

Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim ctrl As Control
For Each ctrl In Me.Controls
 If TypeOf ctrl Is TextBox Then
   ctrl = UCase(ctrl)
 End If
Next
End Sub
 
or in the after update event for each control

controlName=UCASE(Controlname)
 
Code:
I'm looking for a code that wold convert [B]all controls on the form at once[/B]
:D
 
Thanks thats what I wanted, thanks for your time
Cheers
 

Users who are viewing this thread

Back
Top Bottom