Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting text in a table

Status
Not open for further replies.

KerryL

Technical User
May 7, 2001
545
US
I know I can set the format field to > to make the data in a field be displayed in all caps.

But is there a setting I can use that will automatically capitalize the first letter of each word in the field?

If possible, I'd like to do this for Name fields so if a user enters "smith" it automatically is displayed as "Smith" instead.

Thanks
 
Ken, I thought this was a great question and something that I could use too. What am I missing here? I've tried putting it into the Format property of the table and the Input but it doesn't work. Did you leave some bit of info out that everyone but simple-minded folks (like me) would see is obvious?
 
Hi

Will there are a few options:

You could put it in a SELECT Query:

SELECT StrConv(YourString,vbProperCase) As A FROM MyTable

or

an Update Query:

UPDATE MyTable SET MyString = StrConv(MyString,vbProperCase);

or in the before update event of a form used to maintain the table

Me!MyTextBox=StrConv(Me!MyTextBox,vbProperCase)

you cannot use it in the Format statement as far as I know

Hope that helps








Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Hi Ken. I knew I could do this in queries but somehow (don't ask me how??) I got the impression that y'all were talking about formatting table fields. What an idea.
Thanks for getting me back on track.
Ann
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top