Click to See Complete Forum and Search --> : Transposing a field
Tsuga
Jul 5th, 1999, 10:19 PM
Does anybody have a way of transposing a field of variable length so that field values print in a row across a page, wrapiing at the end rather than a column down the page?
EX. I want a Name Field to print like this -
Amy Betty Jim John Mike
Rather than like this
Amy
Betty
Jim
John
Mike
Thanks
bashfirst
Jul 7th, 1999, 03:30 PM
Can't you iterate thru the recordset and append each record on to the end with a space?
While Not rs.EOF
sNames = sNames & " " & rs!Name
rs.MoveNext
Wend
Hope this helps
Bash
Tsuga
Jul 7th, 1999, 03:55 PM
I came across a transposer function at the microsoft sight too. The problem with it is I'm not real sure what will happen if the funtion tries to create field number 256. I wasn't sure that EOF recongnized the end of a field or not. It does and your way is more elegant than the transposer function. I need to get the related information in some kind of order so it will match the transposed data, then i'll give it a try.
Thanks.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.