Hi have a requirement to use MS Access to store (in separate tables) cost data, and in separate tables, proportional allocation (values less than 1) so that I can do a multiplication in a query to multiply Cost x Allocation = Proportional Cost.
The Cost numbers are ok - I can use Currency or Double data type as I only need to go to 2 dps, but some of the proportional allocations might be small numbers like 0.00001234
I am aware from reading this forum that the floating point data types (eg Double) can give 'wrong' answers with calculations. The alternative is Decimal data type, but this has some issues with sorting etc, and some people advise avoiding it entirely.
I need to be able to reliably and accurately do multiplication (and division - to work out the proportional allocation fractions), so my question is: "Which data type should I use?" and a related follow up question: "When doing calculations in queries, should I force the data into a data type (eg cDbl) and if so, which one?"
Thanks everyone
The Cost numbers are ok - I can use Currency or Double data type as I only need to go to 2 dps, but some of the proportional allocations might be small numbers like 0.00001234
I am aware from reading this forum that the floating point data types (eg Double) can give 'wrong' answers with calculations. The alternative is Decimal data type, but this has some issues with sorting etc, and some people advise avoiding it entirely.
I need to be able to reliably and accurately do multiplication (and division - to work out the proportional allocation fractions), so my question is: "Which data type should I use?" and a related follow up question: "When doing calculations in queries, should I force the data into a data type (eg cDbl) and if so, which one?"
Thanks everyone