Timer and saving value (1 Viewer)

MarkPl

New member
Local time
Today, 08:12
Joined
Aug 13, 2007
Messages
3
Let me start off with "I have very little VBA experience." What I am trying to do is to make a timer that will allow users to click on a button to start a cmulative timer and another to stop it. They will have a third button to reset and a fourth that will copy the time from the timer to a field in a table. I have gotten the timer from a MS knowledgbase article 233275.
My problem is now how do I take the timer value and put it into my table field from the Timer subform?
Any help would be GREATLY appreciated.
Thanks,
Mark
 

rainman89

I cant find the any key..
Local time
Today, 08:12
Joined
Feb 12, 2007
Messages
3,015
in the onclick event of the button set the timerfield on your mainform =to the timer field on your subform by using

Me.timerfield=Me!timersubformname.Form!timerfieldName
 

MarkPl

New member
Local time
Today, 08:12
Joined
Aug 13, 2007
Messages
3
re: Timer

I think I didn't explain how my forms are laid out very well.
I have a main form called frmCAR with a subform subfrmTimer.
In the suub form I need to have a button that will take the value of the timer and copy that information into a field in a table. Field name is elapsed_time in the table tblActions.
I tried to use the code that you gave me but I am unable to get it working. Any additional help would be great.
Thanks, Mark
 

rainman89

I cant find the any key..
Local time
Today, 08:12
Joined
Feb 12, 2007
Messages
3,015
I think I didn't explain how my forms are laid out very well.
I have a main form called frmCAR with a subform subfrmTimer.
In the suub form I need to have a button that will take the value of the timer and copy that information into a field in a table. Field name is elapsed_time in the table tblActions.
I tried to use the code that you gave me but I am unable to get it working. Any additional help would be great.
Thanks, Mark

ah i thought u had a button on the main form that you wanted the value of the subform to go to. instead of doing what i said perviously..

Make sure u have the field on the form that is bound to the value in the table and in the onclick event of the button put

Me.elapsed_time = me.fieldonformname
 

Users who are viewing this thread

Top Bottom