Solved

Accumalitive time spent on different days ?

Posted on 1999-01-14
9
561 Views
Last Modified: 2012-05-04
I am designing a report (or trying to) and I need to add up the time spent on a varying number of jobs in a given day, given a start time and completion time.
The first column indicates the date, the second a job number, third is time taken (this is a calculation in a query). The question is how can I put a total figure of time taken in a forth column which increses for every job completed per day. The figure is not to be displayed unless the accumulative time exceeds 7 hours. It must also only include jobs started upto 7.00pm in the evening. A further twist to the problem is in the sixth column a "y" is to be displayed for every total in the previous column exceeding 7 hours.
0
Comment
Question by:davejdavies
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 7

Expert Comment

by:Dedushka
ID: 1973606
Hi, davejdavies!

Please, post here test data from your table and sample of report.

Dedushka
0
 
LVL 9

Expert Comment

by:perove
ID: 1973607
Dedushka,
if yiu want, send me a copy of the table & query & the report (so far) and I will see what I can do

perove

oh..i forgot:
email:
perove@krdata.no
0
 
LVL 7

Expert Comment

by:Dedushka
ID: 1973608
perove,
i do not need help, i want that we together helps davejdavies :-)

My best wishes,
Dedushka
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 10

Accepted Solution

by:
brewdog earned 200 total points
ID: 1973609
As a start, here's what I'd think:

1. For your text box where you want the cumulative time, set these properties:
       Running Sum:       Over All
       Control Source:     [Time Taken Text Box]

2. For the code on the Format event of the Detail section, do this:
       If [CumulativeTimeTextBox] < 7 Then
           CumulativeTimeTextBox.Visible = false
       Else
           CumulativeTimeTextBox.Visible = true
       End If

I don't know how you're planning to do the "y" in the sixth column. I might do that through code, too, with either the visible property or setting the value to "Y" or "".

Hope that helps.

brewdog
0
 
LVL 9

Expert Comment

by:perove
ID: 1973610
Dedushka:
Opps...slip of the finger..sorry.. (thank god its weekend soon..)

Ill try again:

DAVEJDAVIES:
if you want, send me a copy of the table & query & the report (so far) and I will see what I can do

perove

oh..i forgot:
email:
perove@krdata.no

0
 

Author Comment

by:davejdavies
ID: 1973611
Thanks for the assistance, your idea will help me complete half the problem but I still need to know the following:

Brief example of report:

  Date    Job Number    Time taken     Over 7 hours Worked

01/01/99    120            1:00
01/01/99    121            4:00
01/01/99    122            2:30
01/01/99    123            1:20                7:30
01/01/99    124            1:00                8:50
02/01/99    125            3:00
02/02/99    126            4:10            
02/01/99    127            1:33                7:10

I need to be able to group each date and calculate the time taken and display it as above, on the next date the time starts from 0:00. Onlt times over 7:00 arfe to be displayed and any times over 7:00 must be able to be displayed.
With your help I am now able to display or not display the relevant data but the calculations are still giving me problems.
Dave....
0
 
LVL 1

Expert Comment

by:alcapps
ID: 1973612
Dave you could make a temp field and place it in the header for the date group tempfield = 0 ; in the detail make it tempfield = tempfield + time take field.     now you can use the accumulated value to do tests if tempfield > 7 then
                               place your Y
                               make the line visible
                          end if

header make the tempfield = 0 so you can start over for the next date..

hope this helps..

alcapps@yahoo.com
0
 
LVL 10

Expert Comment

by:brewdog
ID: 1973613
Dave:

Like alcapps, I'd recommend a grouping on your date field (I'm guessing you might already have this in place?). Actually, though, once you've established that, it's a little easier than alcapps' suggestion. For your TimeTaken text box, set the Running Sum property to Over Group; the code you already have in place will be fine, and Access will automatically set the value to 0 at the start of each new group/date.

brewdog
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6875546
GREETINGS!

This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.  Also in the Community Support link is a question on how experts can help, if they wish, on the cleaning of old and abandoned questions.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question