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?
middletree [ Do, 12 Juli 2007 18:31 ] [ ID #1766748 ]

Re: Make sure first letter is uppercase

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)
exjxw.hannivoort [ Do, 12 Juli 2007 22:50 ] [ ID #1766752 ]

Re: Make sure first letter is uppercase

Works! Thanks!
middletree [ Fr, 13 Juli 2007 15:34 ] [ ID #1767786 ]

Re: Make sure first letter is uppercase

Middletree wrote on 13 jul 2007 in microsoft.public.inetserver.asp.general:

> Works! Thanks!

Please next time, quote. Usenet is not email!

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
exjxw.hannivoort [ Fr, 13 Juli 2007 16:12 ] [ ID #1767787 ]

Re: Make sure first letter is uppercase

> 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.

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 [ Fr, 13 Juli 2007 17:27 ] [ ID #1767789 ]

Re: Make sure first letter is uppercase

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)
exjxw.hannivoort [ Fr, 13 Juli 2007 17:36 ] [ ID #1767790 ]
Webserver » microsoft.public.inetserver.asp.general » Make sure first letter is uppercase

Vorheriges Thema: using insertion point of data with MSWC.Tools
Nächstes Thema: Hebrew Text from MS ACCESS shows ???? in ASP