Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / May 2007

Tip: Looking for answers? Try searching our database.

Percent help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chad - 15 May 2007 23:04 GMT
Hello I have a query that I want to divide the employees delay time by the
employees worked time. I made this query which works but the decimal place is
in the wrong spot. I am looking for a percentage like this 35% but its giving
me 353%  I have the query "Delay Percent: Sum([DT REGULAR]/[EMPLOYEE TIME])"
fomat set at percent and I have the text box on my report set at "decimal
place 0 format percent". What am I doing wrong? Here is the SQL code:

SELECT Sum([DT REGULAR]/[EMPLOYEE TIME]) AS [Delay Percent],
tblMain.[EMPLOYEE NAME]
FROM tblMain
WHERE (((tblMain.[EMPLOYEE NAME])=[ENTER EMPLOYEES NAME]) AND
((tblMain.[DAYS DATE]) Between [Enter Start Date: (mm/dd/yy)] And [Enter Stop
Date: (mm/dd/yy)]))
GROUP BY tblMain.[EMPLOYEE NAME];
Regan - 15 May 2007 23:22 GMT
Hi

What if you divided Delay percent by 10

Sum([DT REGULAR]/[EMPLOYEE TIME])/10 AS Delay Percent,

Does that work?

>Hello I have a query that I want to divide the employees delay time by the
>employees worked time. I made this query which works but the decimal place is
[quoted text clipped - 10 lines]
>Date: (mm/dd/yy)]))
>GROUP BY tblMain.[EMPLOYEE NAME];

Signature

Regan,
Paeroa
World famous in New Zealand

John Spencer - 16 May 2007 00:19 GMT
Try dividing

Sum([DT REGULAR]) / Sum([EMPLOYEE TIME]) as DelayPercent

Your formula was adding the calculated percentage for each day together.
 So if employee A had .3 on day 1 and  .5 you ended on day 2 up with .8
for the two days.

'====================================================
 John Spencer
 Access MVP 2002-2005, 2007
 Center for Health Program Development and Management
 University of Maryland Baltimore County
'====================================================

> Hello I have a query that I want to divide the employees delay time by the
> employees worked time. I made this query which works but the decimal place is
[quoted text clipped - 10 lines]
> Date: (mm/dd/yy)]))
> GROUP BY tblMain.[EMPLOYEE NAME];
Chad - 16 May 2007 00:45 GMT
Thanks for the help!!! Worked great

> Try dividing
>
[quoted text clipped - 25 lines]
> > Date: (mm/dd/yy)]))
> > GROUP BY tblMain.[EMPLOYEE NAME];
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.