RecordCount

1. Senior Member
Join Date
Dec 1969
Posts
185

## RecordCount

Im using &#060;%=rs.RecordCount%&#062; to get a number and then use this as a hidden value as part of a form.<BR><BR>If for example the &#060;%=rs.RecordCount%&#062; code calls the total 4560 how can I convert this so that it can become 04560 ?<BR><BR>And the same, for example, if I had the total 235, where Ineed it to convert to 00235 ??<BR><BR>Thanks

2. Senior Member
Join Date
Dec 1969
Posts
16,931

## RE: RecordCount

&#060;%=Right("00000" & rs.RecordCount, 5)%&#062;<BR><BR>Craig.

3. Senior Member
Join Date
Dec 1969
Posts
2,854

## RE: RecordCount

For i=1 to 5-(len(cstr(rs.Recordcount)))<BR> numZero = numZero & "0"<BR>Next<BR><BR>Response.Write NumZero & rs.Recordcount<BR><BR>HTH<BR>D.

4. Senior Member
Join Date
Dec 1969
Posts
2,854

## so simple.....

And I deleve off into this elaborate for loop...<BR><BR>W(Well, more elaborate than using right() ;-))

5. Senior Member
Join Date
Dec 1969
Posts
16,931

## Hehe, oh well...

I&#039;m sure I did the same at one point, too. Then I was corrected.<BR><BR>Craig.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•