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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capitalize first letter of each word in a field 1

Status
Not open for further replies.

lebanoncedars

Programmer
Jul 17, 2002
43
CA
Hi there,

How to capitalize the first letter of each word in a field in access automatically?
Example: 22 Forest Hill Dr
I need details please cos I have not much experience.

Thank you
Lebanoncedars
 
The simpliest method for this is to create an update query, and for the fields you wish to capitalize, put

StrConv([name of field], vbProperCase)

in the updateto box....

That being said, this process WILL NOT correctly capitalize names such as McHenry, McAllister, etc.....This is much more complicate but not undoable.

If you want this done each time you input, as opposed to running one "batch update", in the form you are using for data entry, in the afterupdate event for the field in question place

Me![name of field] = StrConv([name of field], vbProperCase)


You should be all set.....Hope the helps and plaease ask if you need more assistance. The secret to creativity is knowing how to hide your sources. - Albert Einstein [spin]

Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top