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
|
|||
|
|||
Leading zero's in a field
How do I set up a field to accept a certain number of digits, for example
seven, and to display leading zeros for any entry that is not at least the maximum number. In this case seven is the maximum I want for this field. Display 123 as 0000123 Thanks. |
#2
|
|||
|
|||
Leading zero's in a field
Set the Format property to:
0000000 -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "matt22" wrote in message ... How do I set up a field to accept a certain number of digits, for example seven, and to display leading zeros for any entry that is not at least the maximum number. In this case seven is the maximum I want for this field. Display 123 as 0000123 Thanks. |
#3
|
|||
|
|||
Leading zero's in a field
I tried that before. This does not display leadin zeros. If I enter 123 only
123 populate the field not 0000123 which is what I was looking for. Any suggestions? "Allen Browne" wrote: Set the Format property to: 0000000 -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "matt22" wrote in message ... How do I set up a field to accept a certain number of digits, for example seven, and to display leading zeros for any entry that is not at least the maximum number. In this case seven is the maximum I want for this field. Display 123 as 0000123 Thanks. |
#4
|
|||
|
|||
Leading zero's in a field
matt22 wrote:
I tried that before. This does not display leadin zeros. If I enter 123 only 123 populate the field not 0000123 which is what I was looking for. Any suggestions? It will display leading zeros until you put your cursor into the field or control. Then it reverts to what is actually stored to make editing easier. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#5
|
|||
|
|||
Leading zero's in a field
Matt
What is stored, and what is displayed, are two different things. Are you working directly in the table? If so, consider using Access forms instead. Regards Jeff Boyce Microsoft Office/Access MVP "matt22" wrote in message ... I tried that before. This does not display leadin zeros. If I enter 123 only 123 populate the field not 0000123 which is what I was looking for. Any suggestions? "Allen Browne" wrote: Set the Format property to: 0000000 -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "matt22" wrote in message ... How do I set up a field to accept a certain number of digits, for example seven, and to display leading zeros for any entry that is not at least the maximum number. In this case seven is the maximum I want for this field. Display 123 as 0000123 Thanks. |
#6
|
|||
|
|||
Leading zero's in a field
Yes, I am working directly in the table in datasheet view. If I set the
format to 0000000 the table displays the numbers as entered, not with leading zeros. When I run a select query on the table the numbers are displayed as entered, not with leading zeros. "Jeff Boyce" wrote: Matt What is stored, and what is displayed, are two different things. Are you working directly in the table? If so, consider using Access forms instead. Regards Jeff Boyce Microsoft Office/Access MVP "matt22" wrote in message ... I tried that before. This does not display leadin zeros. If I enter 123 only 123 populate the field not 0000123 which is what I was looking for. Any suggestions? "Allen Browne" wrote: Set the Format property to: 0000000 -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "matt22" wrote in message ... How do I set up a field to accept a certain number of digits, for example seven, and to display leading zeros for any entry that is not at least the maximum number. In this case seven is the maximum I want for this field. Display 123 as 0000123 Thanks. |
#7
|
|||
|
|||
Leading zero's in a field
matt22 wrote:
Yes, I am working directly in the table in datasheet view. If I set the format to 0000000 the table displays the numbers as entered, not with leading zeros. When I run a select query on the table the numbers are displayed as entered, not with leading zeros. Formatting is not inherited. Even if you saw the formatting you wanted in the table you would have to set the same formatting on the field of your query and then again in any form or report used by the query. In your table are you sure that the formatting is not working when your cursor is NOT in that field? If so then you must have set it incorrectly. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
Thread Tools | |
Display Modes | |
|
|