Filling in "Frontwise Zeros"

THERESA MARIE LOPEZ

New member
Local time
Today, 08:08
Joined
Feb 21, 2002
Messages
5
I think I got an easy question here. I looked under HELP such as for masks or format but couldn't find what I am looking for. Seems like it should be possible?

This is what I am trying to do, I have a form where the operator enters in their 4 digit employee number. My question is lets say they are employee 0010. Is it possible for them to just enter in 10 and then when I go look at the table (or query), it will actually be displayed as 0010?

I was able to get it so that they can enter in 10, but the table displays 10, I want it to display 0010. Is it possible?

Thanks for your help!!!!
 
One way to do it in a query is to select the field as normal but add the "00" before it- like this
"00" & [yourFieldName]

Colin
 
Use the Format property or the Format function.

In the table definition (assuming the data is in an Access table), you could set the format property to 0000. The values in the table will remain the same, but will always be output as a four-digit number, which will include leading zeroes if necessary.

You can also use the same format in the text boxes you display this in on various forms or reports.

Simon
 
Thankyou! The 0000 Format is what I was looking for. I tried it before and was puzzled why it didn't work. Then it finally dawned on me, I was using TEXT data type instead of NUMBER data type -- my bad....
 

Users who are viewing this thread

Back
Top Bottom