Make table field as Double not Decimal

InstructionWhich7142

Registered User.
Local time
Today, 13:25
Joined
Feb 24, 2010
Messages
206
I'm running a couple of Make Table queries based on ODBC imported tables, doing stuff to the data then writing it back.
However I had issues as the make table seems to make Decimals, not Doubles and I need more than 4 DP after calculations,

however it seems doing a bit of logic causes Access to default the fields to double, so:

Code:
clqty: (Sum(IIf([avail]=0,[avail],[avail])))
gets the job done, but seems like a terribly ugly hack, is there some more elegant way to do this?
 
Don't use Make Table. Write the records to a predefined table so you have control over the field type.

BTW. Decimal is more accurate than Double because it stores scaled integers. The number of decimal places can be controlled using the Scale property.
 
Can I use tabledef in DAO to get around this? Also I can't really control how many decimals will be needed, what's the limit on decimal?
 
You could create a tabledef and adjust its field properties in code then append the records from the imported data.

Decimal supports a maximum Precision of 28 digits. All of them can be to the right of the decimal point if required.
 

Users who are viewing this thread

Back
Top Bottom