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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 and the AS400 1

Status
Not open for further replies.

jruegge

Technical User
Apr 27, 2001
3
US
Having problems adding leading zeros into a field prior to exporting it to an fixed length text file and eventually sending it to the AS400. The field I am using is a number field access by default seems to store the information to the left of a fixed lenght field. My AS400 field is 9 in length and uses leading zeros. Is there a function in Access that will move the information to the right and insert leading zeros to fill the rest of the space?


Thanks
Jason
 
One of the best and easiest ways to export data(especially in text form) is to use a query. For your particular fields that need leading zeros and/or same length fields use the following syntax in the field source property:

Expr1: Format([FieldName], "000000000")

this example will give you a field 9 characters in length padding it with leading zeros.
 
Jerry, Thanks for the info it fixed a problem I have worked on for 6 months. You are a life-saver.....

Jason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top