Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Number Field not showing zero's at the end of the number.

Discussion in 'Information Technology' started by naiveprogrammer, Nov 12, 2005.

  1. naiveprogrammer

    naiveprogrammer
    Expand Collapse
    Guest

    I designed a table that has "job number" as a field but it's leaving off the
    zero's. Ex) job number 55.2100 looks like 55.21. I have the field set up to
    double & to allow 4 decimal places. Any ideas???
     
  2. Loading...

    Similar Threads Forum Date
    Shabad Numbering System New to Sikhism Dec 1, 2015
    USA A Heart Attack And The Numbers Breaking News Aug 2, 2014
    Pacific Borneo: Sikhs small in number, strong in presence Breaking News Nov 11, 2013
    World Shrinking Numbers and Growing Persecution Threaten Sikhs and Hindus in Afghanistan Breaking News Nov 7, 2013
    SciTech Mammals pick offspring’s sex to maximize number of grandchildren, study shows Breaking News Jul 11, 2013

  3. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    Numeric data types are seldom a good choice if you need either leading or
    trailing zeroes displayed: as numbers, 55.21, 00055.21 and 55.2100 are all
    identical. As well, numeric fields are prone to floating point round-off
    error: what you see as 55.2100 may, in fact, be stored as 55.20999999999,
    which can lead to problems when checking for equality.

    In general, unless you're going to be doing arithmetic on the values, it's
    best to store them as text.

    If you absolutely can't change the datatype to text, you can set a format of
    #.0000 to ensure that 4 decimal points are always shown. Remember, though,
    that formatting a number doesn't change its value: it's still going to be
    prone to the round-off error I mentioned above.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "naiveprogrammer" <naiveprogrammer@discussions.microsoft.com> wrote in
    message news:7E1FF34C-9473-43C6-8BF7-F72DC301414D@microsoft.com...
    > I designed a table that has "job number" as a field but it's leaving off

    the
    > zero's. Ex) job number 55.2100 looks like 55.21. I have the field set up

    to
    > double & to allow 4 decimal places. Any ideas???
     
  4. Wayne Morgan

    Wayne Morgan
    Expand Collapse
    Guest

    Allowing 4 decimals doesn't force it to display as 4 decimals if there are
    fewer. You will need to format the field to show 4 decimals. If you've
    already created controls on a form or report for this field, you'll need to
    manually update those controls to show the formatting also. Set the format
    property of the field to

    #.0000
    or
    0.0000

    The first one will display zero as .0000, the second one will display zero
    as 0.0000.

    --
    Wayne Morgan
    MS Access MVP


    "naiveprogrammer" <naiveprogrammer@discussions.microsoft.com> wrote in
    message news:7E1FF34C-9473-43C6-8BF7-F72DC301414D@microsoft.com...
    >I designed a table that has "job number" as a field but it's leaving off
    >the
    > zero's. Ex) job number 55.2100 looks like 55.21. I have the field set up
    > to
    > double & to allow 4 decimal places. Any ideas???
     
  5. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Fri, 11 Nov 2005 12:05:03 -0800, naiveprogrammer
    <naiveprogrammer@discussions.microsoft.com> wrote:

    >I designed a table that has "job number" as a field but it's leaving off the
    >zero's. Ex) job number 55.2100 looks like 55.21. I have the field set up to
    >double & to allow 4 decimal places. Any ideas???


    If you're using this field as an identifier, and you won't be doing
    arithmatic with it - use a Text data type, not any sort of number.

    John W. Vinson[MVP]
     

Share This Page