Setting text in text box to uppercase

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to find out how I could set all text that is entered in to my
text boxes in my form as uppercase. How do you do this?
 
Darren,

On the After Update event of each textbox on the form, you could put
code like this...
Me.NameOfTextbox = StrConv(Me.NameOfTextbox, 1)
 
Hi
Look on help
it sould be format and either > or < symbol
one of them it for upper case ad the other for lower case
 
Steve,

I assume "1" is for uppercase
What number would be used for
Lowercase
Propercase

Thanks

Eric
 
Ofer,

Good suggestion. This approach only affects the way the data is
displayed in this particular control. It does not affect the data itself.
 
i've been struggling with other issues and hoping for some replies - then I
saw this post and it was funny because i just finished having succes with
this but I was wondering whether i did it in a good way - i put the following
code in the on exit event of each text box:

Private Sub HouseholdLastName_Exit(Cancel As Integer)
Dim UCHouseholdLastName As String

If Me.Dirty Then
UCHouseholdLastName = HouseholdLastName.Value
UCHouseholdLastName = UCase(UCHouseholdLastName)
HouseholdLastName.Value = UCHouseholdLastName
End If

please let me know what you think.

TDR
 
i've been struggling with other issues and hoping for some replies - then I
saw this post and it was funny because i just finished having succes with
this but I was wondering whether i did it in a good way - i put the following
code in the on exit event of each text box:

Private Sub HouseholdLastName_Exit(Cancel As Integer)
Dim UCHouseholdLastName As String

If Me.Dirty Then
UCHouseholdLastName = HouseholdLastName.Value
UCHouseholdLastName = UCase(UCHouseholdLastName)
HouseholdLastName.Value = UCHouseholdLastName
End If

Um?

One step is all you need, not three:

Private Sub HouseholdLastName_AfterUpdate()
Me!HouseholdLastName = UCase(Me!HouseholdLastName)
End Sub

John W. Vinson[MVP]
 
Back
Top