Make sure first letter is uppercase

I want to take a value that users type into a field (actually 2
fields--first and last name) and convert the first letter to Upper Case. I
htought I could use UCase, but it seems to only work for an entire string.
Anyone got a suggestion?

Advertisements

Middletree wrote on 12 jul 2007 in
microsoft.public.inetserver.asp.general:
> I want to take a value that users type into a field (actually 2
> fields--first and last name) and convert the first letter to Upper
> Case. I htought I could use UCase, but it seems to only work for an
> entire string. Anyone got a suggestion?

t = request.form("myField")
t = ucase(left(t,1)) & mid(t,2)

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

I hate quoting because I am a staunch believer in top-posting, and when I
quote, I get "corrected" by those who hate top-posting. They always remind
me that top-posting is against the rules of etiquitte. In fact, most people
I know prefer to read a top-posted message, but because we weren't around
newsgroups in 1989 when those rules were formulated, we don't get any say.

But I bottom-posted here for you because I really appreciate your help. I
had never heard of "mid" before. Thanks.

Middletree wrote on 13 jul 2007 in
microsoft.public.inetserver.asp.general:
>> Middletree wrote on 13 jul 2007 in
>> microsoft.public.inetserver.asp.general:
>>
>>> Works! Thanks!
>>
>> Please next time, quote. Usenet is not email!
>
> And Microsoft forums are not Usenet.

Any NG that is on usenet is part of usenet.
> I hate quoting because I am a staunch believer in top-posting, and
> when I quote, I get "corrected" by those who hate top-posting. They
> always remind me that top-posting is against the rules of etiquitte.
> In fact, most people I know prefer to read a top-posted message, but
> because we weren't around newsgroups in 1989 when those rules were
> formulated, we don't get any say.
>
> But I bottom-posted here for you because I really appreciate your
> help. I had never heard of "mid" before. Thanks.

OK.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!