Format Name

  • Thread starter Thread starter sandrao
  • Start date Start date
S

sandrao

How can I make sure that a name that is entered as a. smith will be
formatted to A. Smith?
 
Me.YourControlName = StrConv(Me.YourControlName, vbProperCase) in the
BeforeUpdate event of the control should do it.
...using Your Control Name of course.
 
Me.YourControlName = StrConv(Me.YourControlName, vbProperCase) in the
BeforeUpdate event of the control should do it.
..using Your Control Name of course.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted viahttp://www.accessmonster.com

It does correct the first part....the initial is corrected but the
latter part of the first name remains in small letters.
 
Because there is no space between the "." and the Last Name?
a.LastName
not
a. LastName
Me.YourControlName = StrConv(Me.YourControlName, vbProperCase) in the
BeforeUpdate event of the control should do it.
[quoted text clipped - 8 lines]
Message posted viahttp://www.accessmonster.com

It does correct the first part....the initial is corrected but the
latter part of the first name remains in small letters.
 
Does your table hold a single field for the name, or do you have FirstName
and LastName fields (the latter approach is recommended)?

What would you consider to be the "proper" capitalization of something like:

alexandro van de vigge
jean claude van damm
william o'brien

As suggested elsethread, you can use the StrConv() function, but this only
gets you started. You may have to resort to USB (*using someone's brain*)
to finish the job.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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

Similar Threads

Need help formatting Data. 2
Need query to fill in missing data on table 1
Excel Comparing two columns 1
Field with Proper Case 2
avoid duplicate record. 1
FIRST NAME LAST NAME 10
Separate Names 3
Windows 10 How to sort an index created in Word 2013 0

Back
Top