T.R | Title | User | Personal Name | Date | Lines |
---|
1210.1 | Solved it in the KB | DYOSW5::WILDER | Does virtual reality get swapped? | Wed Jul 05 1995 17:59 | 4 |
1210.2 | guarantee 2 decimal places?? | DYOSW5::WILDER | Does virtual reality get swapped? | Mon Feb 10 1997 09:26 | 13 |
| Well, I need to revisit this.
While doing the rounding/truncation, I sometimes lose the right most
digit if it is a zero. For example, rounding 73.40334 yields 73.4, NOT
73.40
I need to get in this case, 73.40, or at least ALWAYS guarantee that
there is 2 decimal places. Is there some way to do this?
Thanks,
/jim
|
1210.3 | | NSIC00::KLERK | Thunderbirds are Go | Mon Feb 10 1997 12:22 | 5 |
|
Doesn't the output format property allow you to specify "2 decimal places,
use zero where needed" requirement?
Theo
|
1210.4 | Stores differently than display | DYOSW5::WILDER | Does virtual reality get swapped? | Tue Feb 11 1997 19:55 | 12 |
| re: .3
Well, for display/printing, the output format will work. However, it
actually stores it as 73.4 not 73.40. I need the 73.40 number for
string manipulation. (I am storing time and need hundredths of a second
and MSaccess does not understand time to this granularity). Is it
possible to force Access to keep both digits when storing the number??
Thanks,
/jim
|
1210.5 | Format seems the way to go | NSIC00::KLERK | Thunderbirds are Go | Wed Feb 12 1997 04:08 | 24 |
|
Making a table with a column of type Currency and it displays 2 digits
always, regardless if I want to enter or modify a number.
For string manipulation you can of course use the Format$ routine to
format any value in the way you want it. For example, if [number] is any
currency (or float) number, Format([number],"0.00") will always return
a string of 2 digits behind the decimal point (both 00 if needed) and
at least one in front of it.
You can try out various Formats till you see one you like by making
a query based on the table containing the numbers. Add that number column
to the grid, and then add a non-column entry in the next grid entry
with:
field: number formatted:Format([number],"00.0000")
table: Table1
show: x x
where [number] is the column name of the number field, the "00.0000" is
the format you want to display, "Format" is the function name and
"formatted" is simply the heading of the query column when you run the
query.
|