Click to See Complete Forum and Search --> : All CAPS


jrthor2
05-16-2003, 08:12 AM
I have a database that was extracted from another program, but all the data in that other program is in all caps. Is there a way that when I display the data, to make it initial caps (first letter of each word is caps)?

Thanks

jrthor2
05-16-2003, 08:40 PM
How do I do that for multiple variables?

FirstNme = rs("FirstNme")
LastNme = ("LastNme")
Address1 = rs("address1")

etc....

Thanks

jrthor2
05-17-2003, 02:51 PM
ok, and help me out here, I'm kind of new to ASP, how to I call that function?

Do I just do

LastName = InitialCaps(rs("LastName"))

etc.?

jrthor2
05-19-2003, 07:33 AM
Ok, sorry for all the questions, but if I have the following:

function InitialCaps()
str = "THIS IS A TEST"
ary = Split(LCase(str), " ")
For i = 0 To UBound(ary)
ary(i) = UCase(Left(ary(i),1)) & Mid(ary(i),2)
Next
str = Join(ary, " ")
End Function

And I have multiple variables that need to use this function:

LastName = objPagingRS("LastName")
FirstName = objPagingRS("Firstname")
Address1 = objPagingRS("Address1")

How do I use the function on these fields? What would str equal??

thanks

jrthor2
05-19-2003, 08:03 AM
not really??

jrthor2
05-21-2003, 01:07 PM
Thanks for all your help, but just one thing (I know, I'm asking a lot here), but if this is used on a name field and their last name is something like McCormick, would it be Posible to display it like that, with the third leter caps??

Thanks again