Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Welcome,

I would like to display first sign in table of a capital letter.

I'm don't looking for input mask for new data, but format for existing data.

I have inside existing table people Names in like bellow:

xyz
yzz
zzz

I would like display

Xyz
Yzz
Zzz
share|improve this question

1 Answer 1

When you read the data out of the database you can use StrConv to convert the value to "Proper Case", meaning the first letter of every word is capitalised and every other letter is lower case. An example is below, this will work within queries and VB.

StrConv( FieldName , 3 )

This works quite well for names (most of the time), here's some examples, including a few that will fail:

john               -> John
john smith         -> John Smith
JOHN SMITH         -> John Smith
jOhN sMiTh         -> John Smith
jOHN sMITH         -> John Smith
john de smith      -> John De Smith      (Error: expected "John de Smith")
john mcsmith       -> John Mcsmith       (Error: expected "John McSmith")
john van der smith -> John Van Der Smith (Error: expected "John van der Smith")

A solution that handles edge cases more effectively requires a custom fuction to do the work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.