A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

TWO DEcimal Places



 
 
Thread Tools Display Modes
  #1  
Old November 9th, 2006, 10:39 PM posted to microsoft.public.access.forms
Gaetanm via AccessMonster.com
external usenet poster
 
Posts: 71
Default TWO DEcimal Places

I have a Query that totals work minutes and devides it by 60
to get the hours. It does not give me the two decimal places.
I have tried Round but it did not work. But please take into concideration
that I'm a newbie.

I have the column in the table set at long interger,fix, two decimal places

Here is the code I do Have :

SELECT time_total.EmployeeID, Sum(time_total.TotalHoursMinutes)\60 AS
SumOfTotalHoursMinutes
FROM time_total
GROUP BY time_total.EmployeeID;
Could you please help

Gaetanm

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1

  #2  
Old November 9th, 2006, 11:21 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default TWO DEcimal Places

You have "the column ... set at LONG INTEGER..."

Integers have no decimal places, no matter how many you tell them to have.

Regards

Jeff Boyce
Microsoft Office/Access MVP


"Gaetanm via AccessMonster.com" u28527@uwe wrote in message
news:690ca30f2e18b@uwe...
I have a Query that totals work minutes and devides it by 60
to get the hours. It does not give me the two decimal places.
I have tried Round but it did not work. But please take into concideration
that I'm a newbie.

I have the column in the table set at long interger,fix, two decimal
places

Here is the code I do Have :

SELECT time_total.EmployeeID, Sum(time_total.TotalHoursMinutes)\60 AS
SumOfTotalHoursMinutes
FROM time_total
GROUP BY time_total.EmployeeID;
Could you please help

Gaetanm

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1



  #3  
Old November 9th, 2006, 11:26 PM posted to microsoft.public.access.forms
CW
external usenet poster
 
Posts: 701
Default TWO DEcimal Places

By definition, an integer is a whole number. So whatever number of decimal
places you may have specified,they will not show up.
Try using Double instead of Integer.
CW

"Gaetanm via AccessMonster.com" wrote:

I have a Query that totals work minutes and devides it by 60
to get the hours. It does not give me the two decimal places.
I have tried Round but it did not work. But please take into concideration
that I'm a newbie.

I have the column in the table set at long interger,fix, two decimal places

Here is the code I do Have :

SELECT time_total.EmployeeID, Sum(time_total.TotalHoursMinutes)\60 AS
SumOfTotalHoursMinutes
FROM time_total
GROUP BY time_total.EmployeeID;
Could you please help

Gaetanm

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1


  #4  
Old November 10th, 2006, 09:52 AM posted to microsoft.public.access.forms
onedaywhen
external usenet poster
 
Posts: 124
Default TWO DEcimal Places


CW wrote:
I have the column in the table set at long interger,fix, two decimal places


By definition, an integer is a whole number. So whatever number of decimal
places you may have specified,they will not show up.
Try using Double instead of Integer.


DECIMAL(n, 2), i.e. type = DECIMAL scale = 2, may be more appropriate.

Jamie.

--

  #5  
Old November 10th, 2006, 02:16 PM posted to microsoft.public.access.forms
Gaetanm via AccessMonster.com
external usenet poster
 
Posts: 71
Default TWO DEcimal Places

onedaywhen wrote:
I have the column in the table set at long interger,fix, two decimal places


By definition, an integer is a whole number. So whatever number of decimal
places you may have specified,they will not show up.
Try using Double instead of Integer.


DECIMAL(n, 2), i.e. type = DECIMAL scale = 2, may be more appropriate.

Jamie.


I have changed to double, fixe and 2 decimal places to no avail. Wher would
that =DECIMAL scale =2 be put in the SQL

Gaetanm
--


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1

  #6  
Old November 10th, 2006, 03:24 PM posted to microsoft.public.access.forms
onedaywhen
external usenet poster
 
Posts: 124
Default TWO DEcimal Places


Gaetanm via AccessMonster.com wrote:
Wher would
that =DECIMAL scale =2 be put in the SQL


In the UI: Table, Design View, Field Size: change 'Long Integer' to
'Decimal', (UI redraws itself - yuk!), Scale: change from 0 to 2 (or
possibly 3 to allow for custom rounding).

Jamie.

--

  #7  
Old November 10th, 2006, 05:10 PM posted to microsoft.public.access.forms
Gaetanm via AccessMonster.com
external usenet poster
 
Posts: 71
Default TWO DEcimal Places

onedaywhen wrote:
Wher would
that =DECIMAL scale =2 be put in the SQL


In the UI: Table, Design View, Field Size: change 'Long Integer' to
'Decimal', (UI redraws itself - yuk!), Scale: change from 0 to 2 (or
possibly 3 to allow for custom rounding).

Jamie.

--

Thank you you have been a great help


Gaetanm

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.