Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help - I need to add zeros to beginning of a field for every entry

Status
Not open for further replies.

skd2726

MIS
Jul 2, 2002
24
0
0
US
I have a db that all the fields are will be exported in txt format into another system, in one field the users will enter a 5 digit number but when it exports in txt format it needs to export as an 8 digit field

Example:

user enters 12345
exports as 00012345

Any suggestions?
 
Create a loop:

dim str as string

str = EnteredNumber

while len(str)<8
str = &quot;0&quot; & str
loop

or something like that
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top