Strange output in access 97..

mohsinhq

Registered User.
Local time
Today, 18:07
Joined
Aug 2, 2004
Messages
90
Hi all,

I have a data entry form where users enter figures to 3 decimal places.

eg A = 1.435
B = 2.650

This gets saved as a record to a table. I then create reports based on the table.

However, Ive noticed that when i run the query the system seems to add random digits on to the end of the number fields.

Eg A = 1.4350006849 even though it was only entered as a 3 decimal place figure!

This is creating major problems as a very large set of data is being used and everytime I do a sum function it adds up to more than it should be!

any ideas how i can get rid of this problem?

Please help, all suggestions are welcome and will be tried!

Thanks
 
in the properties of your field did you set the amount of decimal places you would like to have ?
 
You said:

Please help, all suggestions are welcome and will be tried!

In the table make sure your data type is number and then change or make Field Size "Double" and Decimal place is 3. I have just tested it in Table, Query and Report and it worked fine.


Regards,
 
maxmangion said:
in the properties of your field did you set the amount of decimal places you would like to have ?

Max,

The field properties are currently set to Single and Auto. I have set the decimal places up in the Query properties for the field. (Fixed and 3)

ansentry said:
In the table make sure your data type is number and then change or make Field Size "Double" and Decimal place is 3. I have just tested it in Table, Query and Report and it worked fine.

Im just about to try the double property in the table.
 
try setting the field size to decimal and then make use of the Precision property.
 
sorry to be a pain guys but ive just tried all that without any luck..

hopefully the attachements might help visualise the problem.

I changes the table properties to Double and set decimals to 3. this showed all output in the datasheet to 3 decimal places which is correct.(table_Datasheet_View.jpg)

however, when i create a query based on this, it still brings up random digits! (Query_Output)
 

Attachments

  • Query_Output.jpg
    Query_Output.jpg
    10.5 KB · Views: 103
  • Tabl_Datasheet_View.jpg
    Tabl_Datasheet_View.jpg
    12.1 KB · Views: 123
  • Table_Design_View.jpg
    Table_Design_View.jpg
    5.6 KB · Views: 104
instead of Double try selecting Decimal, and a new property "Precision" should appear ... then click F1 on this property to understand exactly what it does.
 
Alternatively use the Format Function:

Expr1: Format([fieldname],"#.###")
 
im using access 97? is that option available.. if so, i cant see it in the field size?
 
yes if i am not mistaken it is available in 97 as well. From the fieldsize choose Decimal ... after choosing decimal the precision property will be visible.
 
im struggling to see this option in access 97!

any other ideas to solve this.

where do these random digits actually come from? because the number entered is only to 3 decimal places, so why is it transformed into one which has about 1o decimal places?!?
 
Alternatively, base your report on a query rather than on a table, and add a calculated field with the following:

Expr1: Format([fieldname],"#.###")

This should solve you the problem.
 
ive just restructured all my tables based on the Double and Auto properties for numbers.

The tables are showing a lot of additional decimal places for all records but i have begun manually deleted additional digits. i tried a query and it worked so just a lot of clean up to do :)

thanks for your help
 

Users who are viewing this thread

Back
Top Bottom