How to Convert First letter lowercase to upper case in Form

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

Guest

Hi Friends,
I have a Call information data table.
I have created a form based on this table.
In my table and form I have Name, Address1, Address2 …. Fields.
What I need to do is: If I type name in lower case automatically I need to
convert First letter Capital and remain simple. Need ach word same auto
conversion.
I need to do this in my Form. Please help me.
Thank you in advance
Indu from UK
 
Hi, Indu.

In each text box's OnAfterUpdate( ) event, use the StrConv( ) function with
the vbProperCase parameter. For example:

Private Sub txtName_AfterUpdate()
Me!txtName.Value = StrConv(Me!txtName.Value, vbProperCase)
End Sub

.. . . where txtName is the name of the text box.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
Hi Camaro,
I cannot see any tick box bottom of the message
how i comment this it's work. Thank you so much
 
Hi, Indu.

You're very welcome. I'm glad it's working for you. Please see the
following Web page:

http://www.microsoft.com/office/com...orms&mid=d8b982bd-fe5f-403b-b2d4-76d2201c15e3

Scroll to the right and at the bottom of the window pane should be the
question, "Did this post answer your question?" with "Yes" and "No" buttons.
If instead you see the question, "Was this post helpful to you?" then the Web
site doesn't recognize you as the original poster of the question, so please
sign in using your .Net Passport first, and then select the "Yes" button for
"Did this post answer your question?"

Thanks! It's much appreciated!

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.
 
HI Camaro or anyone else that can help

I have posted the code you gave to Indu in one of my forms a field to
convert more than one words first letter to a capital letter and it worked
great! But I then decided I would do it to a few other fields also, but not
so great, it doesnt work on the other fields yet it works fine on the first?!

Not sure why and wondered if you had a possible solution... I did the norm
thing to do as to ensure the field name was correct and on after_update as
with the first field... but totally lost as to why it ignores the code... it
doesnt go into the code at all.

Thanks

Saj
 
Thanks...this worked for me also...but only after an interesting
modification...i had to put the code into the After Exit box, not after
update !!

What do you think of that?
 
This worked for me too. However, I also need to change the following format:

Lastname, Firstname.
Ex: Smith, Jane

I need the L and F to capitalize for me.

Your help is greatly appreciated.

Hannah
 
Hannah,
Using concatenation on the FName = "jane", and LName = "smith"
(all on one line)
=Ucase(Left(LName,1)) & Mid(LName,2) & ", " & Ucase(Left(FName,1)) &
Mid(FName,2)
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Back
Top