Changing table properties

aziz rasul

Active member
Local time
Today, 08:32
Joined
Jun 26, 2000
Messages
1,935
I have a make table query that makes a calculation (multiplication of an integer to a value with 3 decimal places) which produces a numerical value to 3 decimal places. I want to change the value to 2 decimal places in the table.

How do I change the Format property of a field in a table to "Fixed" using VBA to force the value to be to 2 decimal places.
 
Unless you are using a currency data type, the table will store the actual value of a field. Formatting only affects what is displayed. It doesn not affect what is stored.
 
I understand what u r saying Pat. If I output the data to a xls file, I get, say, 13.429 instead of 13.43 which is what I prefer. What do I do to store the value as a 2 decimal places.

The 3 decimal value is a Currency field and the resulting value is a Numerical field.
 
To Force it you can nest a few functions:

i.e.

=CSng(Format(myValue, "Currency"))
 
Many Thanks. I also found about the Round function.
 

Users who are viewing this thread

Back
Top Bottom