Link to home
Start Free TrialLog in
Avatar of mbath20110
mbath20110Flag for United States of America

asked on

Customizing the autonumber field

Anyone have a suggestion for customizing an autonumber id field to hold leading zeros.

My customer wants their table to be exported to a text file with the id field holding 10 characters with zeros as place holders. ie. 000000001, 0000000002, etc.

So of course when I export to text, my zeros are being dropped.

Can I keep my autonumber functionality while accomdating leading zeros?

Much appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RgGray3
RgGray3

Another method would be to create the field by within your query create a field using the following

NewIDField: Right("0000000000" & CStr([TheIDFieldName],10)