above will work if you only have five digits.. sorry.
did you try cStr(number) Function?
Main Topics
Browse All TopicsI am trying to pass an account number to a bill payment service from my website. The account number is being pulled from a database using recordsets in dreamweaver. The account number has a leading zero that is not being passed with the rest of the account number. I have the number pulled from a MS SQL Server and the colum format is "nvarchar". I either need to know how to format the recordset to allow the leading zero to be passed or how I can us paddigit to make my 9 digit account number into a 10 digit account number by adding the leading zero. I am attaching the edited part of the code that passes the hidden account number:
<form name="form3" method="post" action="https://paymentweb
<input type="hidden" name="acct_number" value="<%=(Recordset2.Fiel
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: adilkhanPosted on 2009-10-08 at 16:10:00ID: 25531166
Dim myPaddedNumber, myOutputNumber ber)
'
'/ Get the value from your recordset and add 5 leading zeros /'
'
myPaddedNumber = "00000" & rs("Number")
'
'/ Now Take the Right 5 Characters From that String
'
myOutputNumber = Right(myPaddedNumber,5)
'
'/ Write it out
'
Response.Write(myOutputNum
You could easily make this into a function too. It would look like this:
Function PadMyNumber(value)
padMyNumber = Right("00000" & value,5)
End Function