changing upper and lower case text

G

Guest

I am trying to format text in a Table to change from all uppercase to first letter of every word uppercase and everything else lower(isn that "proper"?) I know I have seen how to do this before but can not find it again to save my life...if I input keywords into the wizard it brings back "proper worksheet function" and gives me the syntex proper(text) but not what to do with this info....It might be important to know that I want the text to change because a query based on the table feeds a mail merge....and of course i want my letters and mailing lables to look more professional then all caps
 
C

Cheryl Fischer

You're on the right track. What you need is the StrConv() function, which
uses the argument vbProperCase to convert strings so that each word in the
string has its first letter capitalized.

To use the function in VBA code, you can use the vbProperCase argument as
follows:

strFullName = StrConv([FullName], vbProperCase)
' Will convert JACK SMITH to Jack Smith

To use the function in a Query, you must use the numeric value of the
argument:

ConvFullName: StrConv([FullName], 3)


hth,
--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


Reesey said:
I am trying to format text in a Table to change from all uppercase to
first letter of every word uppercase and everything else lower(isn that
"proper"?) I know I have seen how to do this before but can not find it
again to save my life...if I input keywords into the wizard it brings back
"proper worksheet function" and gives me the syntex proper(text) but not
what to do with this info....It might be important to know that I want the
text to change because a query based on the table feeds a mail merge....and
of course i want my letters and mailing lables to look more professional
then all caps
 
G

Guest

thanks Cheryl--as you were probably typing this I did an update query inputing the expression StrConv([my field name],3) so I updated the data already in my table--which will work ok because I import a new table each business quarter and will have to format the data all over again--actually now that I stumbled on it ---it makes more sense. If I imported a new table and replaced the old table, to have to go in and format the field property would be wasteful. With this action I could import the table and run the saved update query.
I am such an access geek---I just have to become a systems admin, I get excited over these challenges.
 
C

Cheryl Fischer

I am such an access geek

Welcome to the club! <smile>

--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


Reesey said:
thanks Cheryl--as you were probably typing this I did an update query
inputing the expression StrConv([my field name],3) so I updated the data
already in my table--which will work ok because I import a new table each
business quarter and will have to format the data all over again--actually
now that I stumbled on it ---it makes more sense. If I imported a new table
and replaced the old table, to have to go in and format the field property
would be wasteful. With this action I could import the table and run the
saved update query.
I am such an access geek---I just have to become a systems admin, I get
excited over these challenges.
 
C

Cheryl Fischer

I think the last time I created a Macro was around 199r or 1995 <g>, as they
cannot be debugged or error-trapped and (in comparison to VBA) are quited
limited in what they can do, so I'm not the best person to ask about them.


--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


Reesey said:
please check out my other question in macros...its a bit more complicated
and I really want to learn something new on that level too.
 

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