469,275 Members | 1,871 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

how to format text box in access form to show 000 before serial number?

107 100+
I am in microsoft access form - I want a field called serial number to have number display with 3 zeros before it. the serial number is always 5 digits. I have tried putting "00000000" in format of properties box and not working.
On the form the field is in a text box.
I have tried using stuff like me.serialnumber.text= format (serialnumber,"00000000") but I get to change first record but not the rest.
I am not figuring out input mask.
I have a feeling I am doing something thats basic wrong.
thank you
Apr 12 '07 #1
7 15128
280 Expert 100+
In that field's property, look for Format (easy way, click on Fornat tab then find format property - it might be set to General Number or something)

did u try just putting 00000000 in there?

is the serial number field defined as number in the table?
Apr 12 '07 #2
107 100+
I just tried putting 00000000 with out "" - still not showing - I believe in the table the field is text- should I make it a number- but some of serial numbers have letters in them
Apr 12 '07 #3
280 Expert 100+
Being text would explain why u cant put them in

How are these serial numbers created in the first place
Could control that, ensure 000 is added in
Apr 12 '07 #4
107 100+
I have already imported data in database-40,000 records- I realize now I needed to format serial number field with the 3 extra 000- -
that is the why-
I had thought like you said I should just be able to put 00000000 in format of properties and it should do it - but it is not working-
Apr 12 '07 #5
107 100+
being it txt is the why - I see now re-reading your answer-
any ideas of anything I can do
Apr 12 '07 #6
do you just want it to dispay the 3 0's or do you actually want to add the 3 0's to the underlying data in the table.

if it is the former then on the format property of the text box have it equal this
that will add tthe 3 0s to the textbox
now if you want to add it to the underlying table you will need to create an update query for it. with the statement update tablename serialnumber = '000' & [serialnumber] or something simular to that

I hope this helps

Apr 12 '07 #7
107 100+
yes that helps- I have to add to the serial number-
thank you- ( I probaly should of made question clearer in the beginning)

Thank you
Apr 12 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by David | last post: by
1 post views Thread by Peter | last post: by
5 posts views Thread by Subrahmanyam Arya | last post: by
10 posts views Thread by DontellTrevell via AccessMonster.com | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.