logic and setting the decimal

  • Thread starter Thread starter jegrau
  • Start date Start date
J

jegrau

Is there any way to set up a field so you only get two decimal places either
by coding or properties in Access 2007?

I have a field that converts hours to work months.

My Code: WorkMonthsUsedTL = HoursUsedTL / 174

Form entry HoursUsedTL 8

Result: 4.59770114942529E-02

This is confusing because if you use a calculator and enter 8/174 you would
get:
0.04597701149425
I don't understand why its puting the 4 in front of the decimal?

"Thanks for any support you may have"

--
John E. Grau
IT Specialist
Bureau of Land Managment
Miles City Field Office
Miles City MT 59301
(e-mail address removed)
 
On Wed, 19 Aug 2009 14:59:15 -0700, jegrau

The value you received is in what's called Scientific Notation and is
a widely accepted format for floating point values. You may have
missed the last part "E-02".
4.5E-02 is the same as 4.5 * 10^-2 = 0.045.
To force the format you desire, you can set the Format property to
Fixed.

-Tom.
Microsoft Access MVP
 
Back
Top