Upper Case

  • Thread starter Thread starter Chris Kudron
  • Start date Start date
C

Chris Kudron

In addition to this message sent earlier. How do you
always capitalize only the first letter in a field?
*************************************************
How do i use the UCase to make a field uppercase only?

In addition to the other solutions offered, you can also
force the entries to
upper case as they are typed from within the
control's "KeyPress" event
procedure:

'**********
Private Sub txtUpper_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
*******************************************************
 
Chris,
If you need only the first letter of the field Capped, I would use the
AfterUpdate event of the field. Then you can wait for the whole entry to
complete before you operate on it.
Private Sub YourTextField After_Update()
[YourTextField] = Ucase(Left([YourTextField],1)) &
Mid([YourTextField],2)
End Sub
 
Works great, Thanks

-----Original Message-----
Chris,
If you need only the first letter of the field Capped, I would use the
AfterUpdate event of the field. Then you can wait for the whole entry to
complete before you operate on it.
Private Sub YourTextField After_Update()
[YourTextField] = Ucase(Left([YourTextField],1)) &
Mid([YourTextField],2)
End Sub
--
HTH...
Al Campagna
Candia Computer Consulting
Candia, NH


In addition to this message sent earlier. How do you
always capitalize only the first letter in a field?
*************************************************
How do i use the UCase to make a field uppercase only?

In addition to the other solutions offered, you can also
force the entries to
upper case as they are typed from within the
control's "KeyPress" event
procedure:

'**********
Private Sub txtUpper_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
*******************************************************


.
 
In addition to this message sent earlier. How do you
always capitalize only the first letter in a field?

Just an additional option: if you want Proper Case, Each Word
Capitalized, you can use StrConv([textfield], 3) in the same manner
that you can use UCase.
 
Back
Top