Format Does not Carry over from Table (1 Viewer)

jcolwell

New member
Local time
Today, 16:03
Joined
Aug 8, 2014
Messages
1
Hello,

I have an issue w/ queries not showing suffient decimal points, even though the underlying table does have the formatting I desire. If I open Table 1 directly, for Field 1 I have a value of 0.1439254445378153860918842318 using a format of decimal / fixed / Precision: 18 / Scale: 0 / Decimal: 2 and it shows in the table as 0.14 until I click on the cell in which case I get the full value above. This is how I want it to show (0.14). When I run a query on this table, not setting any formats in the query, I get 0.00, and clicking on the cell only provides a result of 0. I've tried a ton of different underlying formats on Table 1, and been unable to get a different result... Any help would be appreciated.
 

vbaInet

AWF VIP
Local time
Today, 20:03
Joined
Jan 22, 2010
Messages
26,374
Welcome to the forum jcolwell! :)

I don't think we're getting the full story here. If the Scale is set to 0 you will lose all values after the decimal place and there's no way you will get the full number of digits if the Precision is 18 because you have 29 digits (1 to the left and 28 to the right of the decimal point).

To get what you described the following properties would have been set:
Precision: 30
Scale: 28
Decimal Places: 2
Format: Fixed

Bear in mind that the Decimal Places property of a field has no bearing if the Format property is not set. The Decimal Places property can be a bit misleading when dealing with the Decimal field size. What's important is the Precision (total number of digits overall, i.e. to the left and right of the d.p.) and Scale (number of digits to the right of the d.p.).

So the Decimal Places property works in tandem with the Format property.
 

Users who are viewing this thread

Top Bottom