Solved

Accumalitive time spent on different days ?

Posted on 1999-01-14
9
538 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
Comment Utility
Hi, davejdavies!

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

Dedushka
0
 
LVL 9

Expert Comment

by:perove
Comment Utility
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
Comment Utility
perove,
i do not need help, i want that we together helps davejdavies :-)

My best wishes,
Dedushka
0
 
LVL 10

Accepted Solution

by:
brewdog earned 200 total points
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 9

Expert Comment

by:perove
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now