|
 |
access_asp thread: title case form entries
Message #1 by jake williamson 28 <jake.williamson@2...> on Fri, 17 May 2002 11:36:57 +0100
|
|
hello!! how's it going??
got a problemo...
how do i get all my form entries to enter into my database in title case?
for example, i would like;
tHE mummY RETurns
to go in as:
The Mummy Returns
as well as:
the mummy returns
to go in as:
The Mummy Returns
can this be done? is it something i can do in the asp or at the database
end?
as ever, any suggestions would be grand!
cheers,
jake
Message #2 by "Thomas, Dean" <Dean.Thomas@u...> on Fri, 17 May 2002 16:30:51 -0400
|
|
Jake,
I would think the easiest thing to do would be to change all letters to
lower case using the LCase function and then loop through and change the
very first to a cap and any others following blanks using the UCase
function. For list of functions and descriptions:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/ht
ml/vsfctasc.asp
...though a Google search would probably turn up a script someone has
already written to do this...that's what I'd try first!
All for now.
Dean
-----Original Message-----
From: jake williamson 28 [mailto:jake.williamson@2...]
Sent: Friday, May 17, 2002 6:37 AM
To: Access ASP
Subject: [access_asp] title case form entries
hello!! how's it going??
got a problemo...
how do i get all my form entries to enter into my database in title case?
for example, i would like;
tHE mummY RETurns
to go in as:
The Mummy Returns
as well as:
the mummy returns
to go in as:
The Mummy Returns
can this be done? is it something i can do in the asp or at the database
end?
as ever, any suggestions would be grand!
cheers,
jake
Message #3 by "Charles Mabbott" <aa8vs@m...> on Mon, 20 May 2002 16:07:28 -0400
|
|
Jake,
Here is a little something that seems to work for me,
watch the placement of the parens.....
Function that does the job for me;
function namecase(vname)
namecase = ucase(left(vname,1))+lcase(right(vname,len(vname)-1))
end function
Here is where I use it;
strfname = Request.Form("sfn") ' first name any format
strfname = namecase(strfname)
strlname = request.form("sln") ' last name any format
strlname = namecase(strlname)
Regards,
Chuck
>
>-----Original Message-----
>From: jake williamson 28 [mailto:jake.williamson@2...]
>Sent: Friday, May 17, 2002 6:37 AM
>To: Access ASP
>Subject: [access_asp] title case form entries
>
>
>hello!! how's it going??
>
>got a problemo...
>
>how do i get all my form entries to enter into my database in title case?
>
>for example, i would like;
>
>tHE mummY RETurns
>
>to go in as:
>
>The Mummy Returns
>
>as well as:
>
>the mummy returns
>
>to go in as:
>
>The Mummy Returns
>
>can this be done? is it something i can do in the asp or at the database
>end?
>
>as ever, any suggestions would be grand!
>
>cheers,
>
>jake
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
|
|
 |