Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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).
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page