Welcome to SPN

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

Sign Up Now!

Decimals In Access

Discussion in 'Information Technology' started by TS, Nov 17, 2005.

  1. TS

    TS
    Expand Collapse
    Guest

    I have set up a table in access, setting the data type to number, the field
    size to decimal, the format to general number and the decimal places to auto
    or "4". When I input the data in the table, the table automatically rounds
    the number to the closest integer. How do I retain the numbers to the right
    of the decimal point
    --
    TS
     
  2. Loading...


  3. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    Check what the Field Size is set to (in the bottom left-hand corner when
    your table is open in Design Mode).

    By default, Numeric fields are set to Long Integer, which don't have decimal
    points. To be able to store decimals, you need to use either Single or
    Double.

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


    "TS" <TS@discussions.microsoft.com> wrote in message
    news:46B1AA5C-2040-4E5A-9EFB-D68823891F8D@microsoft.com...
    > I have set up a table in access, setting the data type to number, the

    field
    > size to decimal, the format to general number and the decimal places to

    auto
    > or "4". When I input the data in the table, the table automatically

    rounds
    > the number to the closest integer. How do I retain the numbers to the

    right
    > of the decimal point
    > --
    > TS
     
  4. xRoachx

    xRoachx
    Expand Collapse
    Guest

    In design view, in the format field, enter: 0.0000

    "TS" wrote:

    > I have set up a table in access, setting the data type to number, the field
    > size to decimal, the format to general number and the decimal places to auto
    > or "4". When I input the data in the table, the table automatically rounds
    > the number to the closest integer. How do I retain the numbers to the right
    > of the decimal point
    > --
    > TS
     
  5. kabaka

    kabaka
    Expand Collapse
    Guest

    ..... and make sure that the field size is not Long Integer or Integer!
    You'll need at least Single or better yet Double.




    "xRoachx" wrote:

    > In design view, in the format field, enter: 0.0000
    >
    > "TS" wrote:
    >
    > > I have set up a table in access, setting the data type to number, the field
    > > size to decimal, the format to general number and the decimal places to auto
    > > or "4". When I input the data in the table, the table automatically rounds
    > > the number to the closest integer. How do I retain the numbers to the right
    > > of the decimal point
    > > --
    > > TS
     
  6. peregenem@jetemail.net

    peregenem@jetemail.net
    Expand Collapse
    Guest

    Douglas J Steele wrote:
    > > I have set up a table in access, setting the data type to number, the
    > > field size to decimal

    >
    > To be able to store decimals, you need to use either Single or
    > Double.


    No, Single and Double are inexact data types for storing floating point
    data, which is rarely encountered (in my experience). Far more common
    is genuinely decimal data.

    With effect from Access2000 and Jet 4.0, we now have has a DECIMAL data
    type. It sound like this is exactly what the OP intended to use.

    Note there is a further data type, CURRENCY, that supports a decimal
    scale of four (fixed). However, CURRENCY has different rounding rules
    to DECIMAL (bankers' vs truncation).
     

Share This Page