0

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

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .