luscus wrote:
I am trying to device a formula so that when i check of a yes/no box
(done) it will automatically add the time in a field called "End
Time" and at the same time stamp the amount of minutes between a field
"begining Time" ( which already automatically stamps the time as you
enter a new record) and the field "end time"
For example : If I begun the new record at 2:45 PM worked on the
problem untill 3:00 PM and solved it. I would then proceed to check of
the box in the field "Done" this would then stamp 3:00 PM in the field
"End Time", and also would stamp 15 in the "Total Time" Field.
I have spent about 15 hours reading in the Microsoft help and I am as
ignorant on how to do this as before I begun.
You have some basic design flaws in your table structure (easily remedied
though).
First off any record where [End Time] is not Null will by definition be
"Done" so you do not need a separate Yes/No field to indicate done you
should eliminate that field and replace the CheckBox on your form with a
button that simply fills in the [End Time] field.
Me![End Time] = Now()
Second, since the difference in minutes between [Start Time] and [End Time]
can be easily calculated on-the-fly, there is no reason to have a separate
field to store that value either. That field should also be eliminated from
your table. On your form all you need is a TextBox with the expression...
=DateDiff("n", [Start Time], [End Time])
To eliminate having to write this expression multiple times in various forms
and reports you can create a query that includes all the data from your
table, but also adds a calculated field [Total Time] using the same
expression. Then you simply use the query every place you are now using
your table. You could also add a calculated field to the query to give you
your [Done] Yes/No field with = Not IsNull([End Time])
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com