Time Management problems

K

Kevin C

I made a little application that keeps time on the activities that we do in
the plant. In my Data I have a start time field and an end time field, and
others that make it job specific. On my report I want to group each task and
get a time total in the group footer. At this point I can only display a
calculated total for a row so we must add the time manually. Can I somehow
total these caculated rows?

Also, the calculation I am useing in the report doesn't work in the update
query, I was going to see if I could caculate the totals from hard data.

This is how I calculate the time:

=DateValue(getelapsedtime([endtime]-[starttime])) How do I store that to my
database?

Any help would be appreciated!!
 
J

Jerry Whittle

The simple answer is that you don't store that data in a table. Rather you
use your
DateValue(getelapsedtime([endtime]-[starttime]))
Every time that you need to see the time that way in queries, form, and
reports.

If you don't, there's always the possibility of inconsistant data. For
example you store 4 hours in the table by running an update query. Then
someone finds an error with the endtime and changes it. Now your endtime -
starttime doesn't add up to 4 hours. Which is right?

There are a few exceptions to that rule, such as an invoice where you don't
want to recompute values, but for the most part never store values that can
be calculated when needed.
 
B

Bob Quintal

I made a little application that keeps time on the activities that
we do in the plant. In my Data I have a start time field and an
end time field, and others that make it job specific. On my
report I want to group each task and get a time total in the group
footer. At this point I can only display a calculated total for a
row so we must add the time manually. Can I somehow total these
caculated rows?

Also, the calculation I am useing in the report doesn't work in
the update query, I was going to see if I could caculate the
totals from hard data.

This is how I calculate the time:

=DateValue(getelapsedtime([endtime]-[starttime])) How do I store
that to my database?

Any help would be appreciated!!

the report sum function won't work on a calculated field, but it
will wort on a calculation.

Add a textbox to the Group footer and make its formula
= sum(DateValue(getelapsedtime([endtime]-[starttime])))

No need to store it in the table.
 
A

Andrew

I am trying to do something similar, but I do need to have the output data
(elapsed time) go to my table, is there an easy way to get it there?


Bob Quintal said:
I made a little application that keeps time on the activities that
we do in the plant. In my Data I have a start time field and an
end time field, and others that make it job specific. On my
report I want to group each task and get a time total in the group
footer. At this point I can only display a calculated total for a
row so we must add the time manually. Can I somehow total these
caculated rows?

Also, the calculation I am useing in the report doesn't work in
the update query, I was going to see if I could caculate the
totals from hard data.

This is how I calculate the time:

=DateValue(getelapsedtime([endtime]-[starttime])) How do I store
that to my database?

Any help would be appreciated!!

the report sum function won't work on a calculated field, but it
will wort on a calculation.

Add a textbox to the Group footer and make its formula
= sum(DateValue(getelapsedtime([endtime]-[starttime])))

No need to store it in the table.
 
B

Bob Quintal

I am trying to do something similar, but I do need to have the
output data (elapsed time) go to my table, is there an easy way to
get it there?

I've, in 25 years of database programming, never seen a situation
where someone "Had to have" the result of a calculation stored in a
table where all the inputs from the calculation were already in the
table. Since it's not necessary, the tools to make it easy don't
exist. You can build a query to do the calculation and either use
the query as a sourc3 for whatever forms or reports need the data,
or modify the query to update a field in the table. But as sure as
the sun rises daily, one or more of those calculated values will get
out of sync with the source values, and your data integrity will be
toast.

Q
Bob Quintal said:
I made a little application that keeps time on the activities
that we do in the plant. In my Data I have a start time field
and an end time field, and others that make it job specific.
On my report I want to group each task and get a time total in
the group footer. At this point I can only display a calculated
total for a row so we must add the time manually. Can I somehow
total these caculated rows?

Also, the calculation I am useing in the report doesn't work in
the update query, I was going to see if I could caculate the
totals from hard data.

This is how I calculate the time:

=DateValue(getelapsedtime([endtime]-[starttime])) How do I
store that to my database?

Any help would be appreciated!!

the report sum function won't work on a calculated field, but it
will wort on a calculation.

Add a textbox to the Group footer and make its formula
= sum(DateValue(getelapsedtime([endtime]-[starttime])))

No need to store it in the table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top