Results 1 to 4 of 4

Thread: leading zeros

  1. #1
    Join Date
    Dec 2002
    Location
    Phoenix, AZ
    Posts
    122

    Unanswered: leading zeros

    how can i get a text field to recognize leading zeros in a number- like 01234?

  2. #2
    Join Date
    Jan 2005
    Posts
    144
    Add leading zeros to numeric strings in Access (95/97/2000)

    There may be times when you need to convert a number to a string with a fixed number of leading zeros. For example, you might need to change the number 55030 to 0055030. Chances are that the formula you use to do this is much more complex than it needs to be. This is especially likely if the number of characters in the original number varies. Fortunately, there's a very simple technique you can use to accomplish this task. Just add the original number to the number 1, followed by as many zeros as characters needed, and then extract the number of characters needed from the right of the result. For instance, to create our previous example, we need a string that's seven characters long. The formula to get the desired answer is

    Right([original_number] + 10000000; 7)

  3. #3
    Join Date
    Dec 2002
    Location
    Phoenix, AZ
    Posts
    122
    stupid question-

    where do i put the string?

  4. #4
    Join Date
    Dec 2002
    Location
    Phoenix, AZ
    Posts
    122
    i figured it out.

    thanks- it worked!!!

Posting Permissions

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