Problems with decimal place in query, table and report

krayziehustler

New member
Local time
Today, 10:34
Joined
Aug 9, 2007
Messages
7
i want my data to have only 2 decimal places. So i change the property of the table to only allow 2 decimal places and i did the same to the report and they are still all over the place....for example a field would say 8.12233444 and another 1.17.....what do you think is the problem?
 
I doubt the property you changed does what you think it did. If you only want your data to have 2 places, you have to limit it to that going in. When data is entered, use the Round() function to make sure you only get 2 decimals stored.
 
Set your table field type to 'double', format to 'Fixed', and decimal places to 2. This should limit what you see to 2 dp.
 
Or on your report open the text box that has the problem decimal. Go to properties on the text box, then Format. Set it to 0.00 (zero point zero zero) That will give you two decimal places and it doesn't matter how many decimals there are in the table or query.

The reason for the differing number of decimal places is the math being used in the query to calculate it. If you are dividing 4 by 2 you will get an quotient of 2.0 If you are dividing 26 by 3 you'll get a quotient of 8.6666666. Since each mathimatical function uses different numbers the answer mau be a whole number or 1 or 2 decimals or decimals to infinity.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom