Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    139

    Unanswered: Display any leading zeros in numeric field

    I have a numeric field that is 5 digits. The customer requests that any leading zeros be retained and displayed. I know the best way would be a text field as no calculation are to be done on this field but they want it to be numeric. How can I display the "LOCID" field to show any leading zeros? I mean to display it only if it was entered. Maybe an input mask or formatting?

    Any help is appreciated!

    B&R

  2. #2
    Join Date
    Jun 2008
    Posts
    3
    Change the format of the number to 00000. That will add leading zeros to any number shorter than 5 digits.

    Edit: Design View > select the field, default will have 'General Number', just type in 5 zeros
    removed that extra zero
    Last edited by Kope; 06-03-08 at 19:49.

  3. #3
    Join Date
    Feb 2004
    Posts
    139
    Thanks sooo much. It works great and it was so simple. I am learning a lot from this forum.

    Thanks Again,
    B&R

  4. #4
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    One thing to consider is on a report how that field will sort (you may not need to sort it). With leading zeroes it will sort as an alpha-numeric and not as a numeric. To see what I mean you can add these values to a test table as Text fields (0124,123,00125) and see how they sort.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •