none
Access 2010: Number field decimal issue

    Question

  • Why can't I put a decimal number into a field designated for numbers no matter what Format I select, e.g. standard or scientific? I see the decimal places, but the decimal part of the number is always zeros, e.g. I put in 5.09 and see 5.00; 44.0258 and get 44.00; 876.654 and get 877.00 or 8.77E+02. It seems to be doing some rounding, but I never get a decimal number, only zeros.  I do not want it to round up or down to the whole integer.

    If I define the field as a calculated field, it works fine, but I need this to be a user input field.

    Thursday, August 23, 2012 12:08 PM

Answers

  • The field size was already set to decimal and precision to 18. I even tried changing it to 24 with no luck. When I changed it to Double, that worked! Although that doesn't make much sense to me.

    Thanks,

    Mark

    • Marked as answer by MarkD54 Thursday, August 23, 2012 1:33 PM
    Thursday, August 23, 2012 1:32 PM

All replies

  • Hi markD54,

    check in the table that decimal places isn't zero.

    check the same in your input field.

    HTH Paolo

    Thursday, August 23, 2012 12:24 PM
  • I am able to increase and decrease the number of decimal places in the formatting section of the fields tab, but the data still contains zeros.

    Where is there a place to check decimal places in the "input field"?

    Thanks,

    Mark

    Thursday, August 23, 2012 12:51 PM
  • I don't know in Access 2010, in the previous versions in the properties of the field you have decimal places and there you can set the number of decimals that you wanna display.

    Thursday, August 23, 2012 1:04 PM
  • Open the Property Sheet for the control on the Form. On the Format tab the second item down is the number of decimal places setting.

    Chris Ward

    Thursday, August 23, 2012 1:11 PM
  • In the Table, in design view select the Field. On the General Tab select Decimal for the Field Size and the Precision for the number of spaces you need the default in mine is 18.

    Chris Ward

    Thursday, August 23, 2012 1:18 PM
  • The field size was already set to decimal and precision to 18. I even tried changing it to 24 with no luck. When I changed it to Double, that worked! Although that doesn't make much sense to me.

    Thanks,

    Mark

    • Marked as answer by MarkD54 Thursday, August 23, 2012 1:33 PM
    Thursday, August 23, 2012 1:32 PM
  • Mark, integers by definition don't have decimal places, whereas double/floats can. If it makes you feel better I had the same issue - I didn't notice that the data type remained as integer even when selecting a format that includes multiple decimals. I'm surprised Microsoft doesn't error handle this impossible situation.
    Wednesday, August 07, 2013 2:06 PM