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

Number data type issue

Status
Not open for further replies.

ad2

Technical User
Joined
Dec 31, 2002
Messages
186
Location
US
Hi,

I have a client ID field that the user wants to enter as an 8 digit number. I've have the data type as number in the table.

The user wants to start with 00000001 and then continue, next 00000002, etc.

Access won't let the it start with a zero. Anyone know a way around this. I looked at the various fromats for the number data type but none seemed to address this.

Thanks,
Ad2
 
in table design by format of client ID put in as many zeros as your heart desirers
 
Sorry pwise, I don't understand your answer.

Currently in table design, the data type for client id is number. In datasheet view, the field will not take leading zeros as the user wants.

Are you telling me to somehow change the format?
 
That's precisely what he's telling you to do. In the table design, go to the desired field and in the Format property enter the text:

Code:
00000000


-V
 
Got it. Thanks to both of you.
 
Bear in mind that this will not store all the leading zeros in the table- it will only display them. No numeric data type will store the leading zeros as they have no affect on the intrinsic value (00001234=1234).

If you want to actually store the leading zeros in your table you would need to change the field data type to text.

Ed Metcalfe.

Please do not feed the trolls.....
 
Thanks for the tip!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top