Access Shortening Number- -Prevent

D

DMerchen

I am working on a database for a bunch of equipment maintenance. I have several forms and I have automated a few things using buttons for the user to use instead of typing everything in again. A few of my ID numbers begin with zeros such as 0098. When I am done with a maintenance task I hit a button and it automatically calculates the new date and copies the number andputs it in a new record. The problem I am running into is that Access shortens the number from 0098 to 98. In the table i have it as a text input. Is there someway to prevent this change from occurring? Thanks for any help.
 
D

Douglas J. Steele

The only reasons I can think of for losing the preceding zeroes are that
you're converting the text value to a number at some point, or that you've
got code that uses something like Mid or Right on the text value.

What's the code you're using when you hit the button?

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)


DMerchen said:
I am working on a database for a bunch of equipment maintenance. I have
several forms and I have automated a few things using buttons for the user
to use instead of typing everything in again. A few of my ID numbers begin
with zeros such as 0098. When I am done with a maintenance task I hit a
button and it automatically calculates the new date and copies the number
andputs it in a new record. The problem I am running into is that Access
shortens the number from 0098 to 98. In the table i have it as a text
input. Is there someway to prevent this change from occurring? Thanks for
any help.
 
Top