"Sam W." <(E-Mail Removed)> wrote in message
news:3025063A-E3BE-4329-8AC4-(E-Mail Removed)
> I am building a database to track each ad that graphic artists build.
> I've got the forms built, but I'd like to ad a timer that is bound to
> each ad that shows the total time spent on each ad. It needs to have
> a start/stop/pause button and maintain the value in a table for each
> ad. The artists sometimes move from one ad to another without
> finishing, so it needs to be able to be paused and continued at a
> later time. Is there a way to do this in access? I've tried several
> of the timers, but none of them will append the time to each record
> and none have been able to be paused to pick up later. Thanks in
> advance for the advice.
I use a time-clock application that I built for my own business. It has
tables of clients, projects (related many-to-one with clients),
employees, and clock data. Each clock data record has fields for
ProjectID, EmployeeID, ClockStart (date/time), and ClockStop
(date/time). The central form has a continuous subform of projects with
a Start button for each, and a Stop button on the main form.
When the employee clicks one of the Start buttons, it does two things:
(1) If there's a ClockData record for this employee with Null in the
ClockStop field (indicating a job in progress), it updates that record's
ClockStop with Now(), thus "stopping" that project.
(2) It adds a new ClockData record for the project that was clicked,
setting its EmployeeID to the current employee, setting its ClockStart
field to Now(), and leaving ClockStop as Null.
When the employee clicks the Stop button, it does the same as item (1),
above.
There's some code behind the form that detects if there's a project in
progress (started but not stopped) and highlights that project in red.
There's a time-sheet report that shows the time clocked by employee and
project.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)