See attached Access Form. These amount should add up to zero. As you can see, the textbox shows a value of “.000000000000909” in the 1st screen shot. All my amounts were entered with 2 decimal places. Each amount is a debit (+) or acredit (-). I extended the places out to 15 so I could see if any amounts show out there in decimal point land. Nothing. All my other journal entries balance to zero and they work fine. My validation routine keeps stopping on this entry because it is not zero (as it should). Could there be a screwy bug in Access? What am I doing wrong? Any suggestions?
I am not a pro, but I have developed many applications in access and other programming languages. Here is what Ihave tried:
- Checked to make sure the “Amount” field in the table is number type set to “Double” with 2 decimal places.
- I ran a total query on the table and I get the same value (“.000000000000909”) out side of the form.
- I added it up manually and it adds to zero.
- I tried rounding the “Amount” field to 2 places inside the Sum() function. No Joy! Here Is the formula: =Sum(IIf([Debit_Credit]="C",-(Round([Amount],2)),Round([Amount],2)))