Confused by this:
I have a sub form where I can record payments against an invoice. The total payments received are compared to the invoice total to determine if the bill is fully paid.
However I have found that a single payment of 49.95 shows the sum of payments as 49.950000763
I had Total Payments set to 2 decimal places and currency format in the subform - but could not find out why the payment did not result in the invoice being fully paid - as the values appeared to be equal. Changing to General Number format on the form revealed the discrepancy.
Thinking it may have been the data type for the Payment Amount I have the item capturing the payment as Number, Field Size: Single, Format Currency, decimal places 2. Looking at the data directly in the table all appears OK / entry of "49.95" is accepted ok and shows as $49.95 - however I clicked on this displayed value in the table and it shows: 49.9500007629395. Trying to edit this to remove the extra values was unsuccessful. No other values for other records in the table display the extra digits when editing directly on the table. Until I edited a payment value entering and entered value to 3 decimal places - (it is now showing value: 1.95000004768372 when editing).
I don't know what to do about this. What do you recommend? If I follow through on trying Integer, the amounts will be recorded in cents and the presentation of the values will require, I think, conversion to string, placing the decimal point and prefixing the $.
I have a sub form where I can record payments against an invoice. The total payments received are compared to the invoice total to determine if the bill is fully paid.
However I have found that a single payment of 49.95 shows the sum of payments as 49.950000763
I had Total Payments set to 2 decimal places and currency format in the subform - but could not find out why the payment did not result in the invoice being fully paid - as the values appeared to be equal. Changing to General Number format on the form revealed the discrepancy.
Thinking it may have been the data type for the Payment Amount I have the item capturing the payment as Number, Field Size: Single, Format Currency, decimal places 2. Looking at the data directly in the table all appears OK / entry of "49.95" is accepted ok and shows as $49.95 - however I clicked on this displayed value in the table and it shows: 49.9500007629395. Trying to edit this to remove the extra values was unsuccessful. No other values for other records in the table display the extra digits when editing directly on the table. Until I edited a payment value entering and entered value to 3 decimal places - (it is now showing value: 1.95000004768372 when editing).
I don't know what to do about this. What do you recommend? If I follow through on trying Integer, the amounts will be recorded in cents and the presentation of the values will require, I think, conversion to string, placing the decimal point and prefixing the $.