If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I allow a leading zero in an Access number field?
I have a 5 digit number that may or may not have a leading zero. This is the
key field in the database. I need it to allow and display a leading zero. |
#2
|
|||
|
|||
How do I allow a leading zero in an Access number field?
Change it to a text field. Number (integer) data types cannot have leading
zeros. -- _________ Sean Bailey "George" wrote: I have a 5 digit number that may or may not have a leading zero. This is the key field in the database. I need it to allow and display a leading zero. |
#3
|
|||
|
|||
How do I allow a leading zero in an Access number field?
You can use the Format function, which returns a string. In a query field:
NewField: Format([NumberField],"00000") In the Control Source of an unbound text box: = Format([NumberField],"00000") "George" wrote in message ... I have a 5 digit number that may or may not have a leading zero. This is the key field in the database. I need it to allow and display a leading zero. |
#4
|
|||
|
|||
How do I allow a leading zero in an Access number field?
Hi,
Or, just set the Format property of the text box to 00000. Clifford Bass "BruceM" wrote: You can use the Format function, which returns a string. In a query field: NewField: Format([NumberField],"00000") In the Control Source of an unbound text box: = Format([NumberField],"00000") "George" wrote in message ... I have a 5 digit number that may or may not have a leading zero. This is the key field in the database. I need it to allow and display a leading zero. |
#5
|
|||
|
|||
How do I allow a leading zero in an Access number field?
On Wed, 10 Dec 2008 07:27:01 -0800, George
wrote: I have a 5 digit number that may or may not have a leading zero. This is the key field in the database. I need it to allow and display a leading zero. 5, 05, 00005 and 000000000000000000000000000005 are *all the same number*, and they are stored in the same way (binary 00000000 00000000 00000000 00000101 if it matters). If you want to store leading zeros and make a distinction between values with and without leading zeroes then you must store the data in a Text field, not a Number. -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|