This topic is locked

set proper

6/8/2011 10:41:16 PM
ASPRunnerPro General questions
G
georgeb author

I added a dynamic array to the proper example in tutorials. redim the array to the number of fields to you want propered on your form then insert the fieldnames in the array. enhancement add a second column to hold a code determining the action to take on the field value like "U" for upper,"L" for Lower, etc. then modify the for each code to take the code action on the field value.

use at your own risk and let me know if there is a better way <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=17171&image=1&table=forumtopics' class='bbcemoticon' alt=':)' />

Dim myDynArray() 'Dynamic size array

ReDim myDynArray(1)

myDynArray(0) = "FirstName"

myDynArray(1) = "LastName"
For Each item In myDynArray
str = values(item)

for i=1 to len(str)

if (i=1) then

b = true

else

b = ( Mid(str, i-1, 1)=" " )

end if

if b then

str = left(str, i-1) & UCase(Mid(str, i,1)) & Mid(str, i+1)

next

values(item)=str

Next