Access db that can be set up like a stopwatch

TIDMAN

Registered User.
Local time
Today, 18:29
Joined
Feb 16, 2002
Messages
119
Hi there all, I have been asked to create an access 97 database for logging time on a machine at work, they would like it to work as a stopwatch start and stop buttons can this be done so that as a user clicks the start button access will log this time and then when the user clicks the stop button this time is logged also then the db would have to display the time that it took.

Is this possible please if so, is there anything that i should consider b4 i start?

Thanks so very much in advance.

TIDMAN.....:confused:
 
Here's something to get you going :)
 

Attachments

Thanks so much dan-cat i tried your sample the only thing i dont get is the duration i clicked start 10:12:52 PM then stop 10:13:09 PM and i got a duration of 12:00:17 AM

Thanks in advance for any help so that i can understand this part:confused:
 
TIDMAN,

I would say that the control should receive the results of the
DateDiff function. The control that gets the elapsed time
should not be a date/time field. Just an integer to hold the
number of seconds, minutes, or hours.

Me.Control = DateDiff("s", Date2, Date1)

Wayne
 
Depending how this will be ultimately used it could be easy or near impossible.

Consider a machine start at 10:03PM, shift change at 11:00PM (new user), machine goes off line at 06:34AM, electricians called, shift change at 7:00AM, machine repaired at 7:53AM, machine goes back into production at 8:03AM under a different user.

How long was the machine off line, and under which user?

Regards,
Chris.
 
TIDMAN said:
Thanks so much dan-cat i tried your sample the only thing i dont get is the duration i clicked start 10:12:52 PM then stop 10:13:09 PM and i got a duration of 12:00:17 AM

Thanks in advance for any help so that i can understand this part:confused:

Hmm I wrote this sample in Access XP and converted it to '97. Works fine for me in XP. I believe the conversion may have screweed things up. :confused:

Try doing this:

Deleting the txtDuration field within the form.
Them adding a new unbound text box into the form.
Call it txtDuration and set the format to Long Time.
See if that works.

You could follow Waynes advice and just record the number of seconds,minutes or hours. You wouldn't have to fiddle with formatting then :)
 
First off i would like to thank everyone for all the help.
I have have come up with this one but my problem is now, i need to save the duration in a table so that i can generate a report is this possible with the form that i have attached if so any advise please.:confused:
 

Attachments

  • 1.zip
    1.zip
    15.5 KB · Views: 155
Thanks Tony Hine, could your db be made in access 97 i just need some tips on how i could get the data from a form back into a table i need to learn lol.

Thanks so very much again.
 
Hi there Tony I am able to get 0.08 and thats the lowest that i can get but you know what its perfect for my needs as we will round to the nearest second or so i am taking it to work tomorow i have made a few mods for reports and printing i may be back to ask the experts again lol.

Thanks again everyone for all the fantastivs and willing help.

TIDMAN:D
 
you actually have to store the tick count in the db, because you cannot divide with ":" in your equation, so you have to store the ticks, then you would divide the ticks by what you want equaled, and to find out the duration you have to subtract the stopticks-startticks then you the eqaution to find the hours, min, seconds, milis. i actually recreated it to work for me, added 2 more field to each table, and created a way of a logging each name as one if a query called it, rather than each one being unique to itself, ill post it when i finish, i am actually going to use this for logging work hours.
________
Ford el falcon
 
Last edited:
That sounds better again a.sinatra

lets us know when its done buddy.

TIDMAN.....;)
 
There's what it looks like so far. Everything works, it took about 10hours :eek: Probably have it posted by 10:00PM PST
________
BMW VII A 7.3
 
Last edited:
The only problem i see with it right now is its gonna stop after how many ticks? is it going to go 99 hours? or is it going to stop at 24

Edit: Nevermind, it worked up to 280 hours (where i stopped and said enough) it will prob go until maybe 500 or so before it starts over again (maybe) but getting closer to post :D
________
WASHINGTON DISPENSARIES
 
Last edited:
Tony Hine said:
NICE Form!!!


I can't make nice forms to save me life.... :(

Thank you very much, alright db was going to get posted yesterday at 10PM PST, but i didnt complete it intime, so hopefully today this shall be ready :D
________
Og Kush Seeds
 
Last edited:
I have to agree man that is a nice for as for duration the most it would be is a few hours at the very most but who knows how things change lol.

Thanks again.

TIDMAN.....;)
 
Here's a question for you: do you need to have the timer actually update itself on the form (and waste system resources) or do you just want to measure the time (in milliseconds) between two actions?
 
Here you go - pretty much the same idea but it doesn't use the form's Timer as this can hog system resources (therefore it won't update on the screen).
 

Attachments

Mile-O-Phile said:
Here's a question for you: do you need to have the timer actually update itself on the form (and waste system resources) or do you just want to measure the time (in milliseconds) between two actions?

I thought about the exact thing, but since i will be only using this for personal use, logging my time, i found that no resources were hurt, my cpu remained at 0%-2%. And i kinda liked seeing time "go"

This is what i made for myself, i guess you could rework it for yourself, have fun! The only thing i noticed is once the listbox (running value of total times) under the heading gets passed 596:31:23:64 the counter will no longer work. But i doubt i was going to have 596+ hours. And when a counter hits that value, it will stop, i have error trapping on, but msgbox disabled so you dont get flooded with a error message. I didnt place any comments in the code, but if you need help with it just ask, enjoy!

*i also have this running hidding the access window, i commented the code so it wouldnt run
________
Grow Medical Marijuana
 
Last edited:

Users who are viewing this thread

Back
Top Bottom