Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table problems

Status
Not open for further replies.

kcmark

Technical User
Nov 2, 2002
63
US
OK - I give up. I can't believe what I am about to write. I have a table that contains a numeric field. The field is formatted as follows: Single; Currency; 2 Decimal places. When I type a value directly into the table the number changes. For example, if I type in 852.54 then the number automatically changes to 852.539978027344. I am not manipulating the data at all - the numbers are keyed directly into the table. I am dealing with dollars and have to be very precise on my calculations. How does this happen?
 
Mine works just fine with your specifications. Suggestion is to delete the field and save the table. Close table. Open in design and add back the field. See if that changes it. If not then delete the field, save, and close. Copy just the structure to a new table. Now add the field and see how it works.

Something is obviously wrong with this table or database. You might also try compacting and repair.

Let me know if this helps.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
I am trying to isolate the problem. I created a completely new database and am getting the same problem. After I input the number into the field and double click on the field then the number changes. Could it be a configuration issue? Something is just not right here.
 
Instead of Single have you tried Decimal ?
Real numbers (Single or Double) don't store exact value but exponent and mantissa.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I am not sure what 'mantissa' is... but you were exactly correct in your analysis. Thank you very much - I thought I was losing my mind.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top