Upper Case

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
*******************************************************
 
A

Al Camp

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
 
C

Chris Kudron

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
*******************************************************


.
 
J

John Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top