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

001 is shown as 1

Status
Not open for further replies.

woodyinoz

IS-IT--Management
Jan 8, 2002
215
GB
Hi all,

I am currently importing a comma serperated text file into Paradox, some of the information being numbers.
Currently I am trying to import '001' into an integer field and, as you would expect it is being written into the table as '1'.
Apart from changing the field type is there any way that I could code something to input '001' as '001', '002' as '002' etc...

Thanks.

Woody.
 
Woody,

Go to properties | format | number | create new format

press create

and set the leading zero's setting to the amunt of zero's you want

regards
hans
 
Woody,

As you probably surmised, Paradox automatically removes leading zeros from numeric (or currency) inputs. If the leading zeros are significant to the actual data values, store the values in an Alphanumeric field.

If however, you're simply after displaying the values with a specific set of leading zeros, Han's ideas will help you create a custom format for doing so.

Please note that printing values with leading zeros is usually done via a custom format or by using a calculated field incorporating the format() function. For an example of format in use, please see which demonstrates how to round numbers accurately. The same function, though, also lets you display numbers with leading zeros.

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top