1. Registered User
Join Date
Nov 2011
Posts
413

I am having a problem with my decimal points. On my form I have an unbound textbox that correctly shows the sum of 2 bound controls.However I have a bound control that incorrectly shows the sum of the unbound textbox.The unbound textbox shows \$19.50 whereas the bound control shows \$20.00

In my table for the bound control name MaterialTotal I have the format set to
Long Integer
Currency
2

What am I doing wrong? The table incorrectly shows \$20.00 instead of \$19.50 as well.

Here are my table fields and their properties,there are 3 of them

Customer Rate Number
Long Integer
Currency
Default=65
______________________________
Matl Mark Number
Long Integer
General Number
______________________________
MaterialTotal Number
Long Integer
Currency

I multiply the first 2 to get the total of the last one.
Last edited by Burrina; 12-04-11 at 15:58. Reason: Further Explanation

Join Date
Nov 2004
Location
out on a limb
Posts
13,692
my guess would be that either the control is bound to a column, or you are setting the value. the fact that its \$20 suggests to me you have bound the control

another possibility is that the control is formatted as integer. check its properties or set the unbound control to say \$19.49

3. Registered User
Join Date
Nov 2011
Posts
413
I am not setting the value and it's not bound to a column.Using the table where all 3 fields are from the return field shows 20.00.The only value assigned is the default one for the field Customer Rate and that value is =65. They are all Long Integer. I am still lost as to how to make it correctly calculate 19.50 instead of 20.00.
Thanks

4. Moderator
Join Date
Jun 2005
Location
Richmond, Virginia USA
Posts
2,764
Originally Posted by Burrina
...I have the format set to
Long Integer
Currency
2

What am I doing wrong?
Healdem has given you the answer. You have the Datatype for the Field set to Number and the Field Size set to Long Integer, and Formatting it as Currency isn't going to override that!

Go back into Table Design View and change the Field's Datatype to Currency and it should behave as you want it to.

But you need to understand that the current Values in the stored in the Table will remain as they were saved, unless you do something to cause them to be recalculated.

Linq ;0)>

5. Registered User
Join Date
Nov 2011
Posts
413
OK,I guess I am just brain dead from all of this.I set all of my data types to currency.But now I cant use [Customer Rate]*[Matl Mark] to get my total,it says.
The database engine does not recognize either the field Customer Rate in a valid expression or the default value in the table customers.
See Examples,Please.I still cant get a total.
Last edited by Burrina; 12-04-11 at 18:52. Reason: Form Examples

Join Date
Nov 2004
Location
out on a limb
Posts
13,692