PC Review


Reply
Thread Tools Rate Thread

decimal issue

 
 
jtfalk
Guest
Posts: n/a
 
      25th Apr 2010
Hello,

I have the following code but can not get the text box on the form to have
any decimal places. I have put in a general number and 2 decimal places in
the property area for the box but it still will not give me any it rounds to
the whole number

Private Sub Finish_OEE_Availability_AfterUpdate()
Me.Finish_OEE_Availability = (Me.Hours_Run_Finish /
Me.Planned_Run_Time_Finish)
End Sub
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      26th Apr 2010
On Sun, 25 Apr 2010 15:53:01 -0700, jtfalk <(E-Mail Removed)>
wrote:

>Hello,
>
>I have the following code but can not get the text box on the form to have
>any decimal places. I have put in a general number and 2 decimal places in
>the property area for the box but it still will not give me any it rounds to
>the whole number
>
>Private Sub Finish_OEE_Availability_AfterUpdate()
> Me.Finish_OEE_Availability = (Me.Hours_Run_Finish /
>Me.Planned_Run_Time_Finish)
>End Sub


The Form does not control the decimal places: the Table does. The default
Number datatype in a table field is Long Integer, and an Integer is by
definition a whole number. The Decimal Places property in the field properties
doesn't change this - it will display .00 but still be stored as a whole
number.

Change the datatype of the table field to Number... Double (to get up to 14
decimals), Decimal (set your own precision), or use a Currency datatype
instead of any sort of Number (exactly four decimals).
--

John W. Vinson [MVP]
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
issue with decimal points Associates Microsoft Access 4 21st Mar 2008 12:24 AM
Format issue ... 2 decimal places displayed? BobC Microsoft Access Forms 19 22nd Feb 2008 09:13 AM
Decimal postion issue Mitch_A Microsoft Frontpage 7 8th Feb 2006 01:00 AM
Decimal point/comma issue =?Utf-8?B?RXhjZWxlcmF0ZS1ubA==?= Microsoft Excel Misc 3 12th Jan 2006 09:47 PM
Decimal place and rounding off issue Naomi Microsoft Excel Worksheet Functions 2 20th Jul 2003 12:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:30 PM.