ThatNewGuy
Technical User
Hello,
I'm building a form with an active clock that tracks the current time via a text box. This works like a charm. It's constantly running unless the user stops the clock with a button. When the command button is selected it copies and pastes the "paused" time into another field so this data can be stored so the user can go back and still use the clock to track time after a break, interuptions, etc.
The first part of the code works fine, but I'm having problems with the second half. My objective is to take the "paused" time and transfer it to field1 then if field1 already contains data it will automatically transfer the updated time to the next available field. All in all, I plan on having four fields on the form that will be able to collect the various amounts of time spent on one project.
Any direction or help would be greatly appreciated at this point. Thanks!
--------------------------
Private Sub SaveTime_Click()
Me.TimerInterval = 0
With Me.Clock
.Visible = True
.SetFocus
DoCmd.RunCommand acCmdCopy
Me.SaveTime.SetFocus
Me.EndTime.SetFocus
DoCmd.RunCommand acCmdPaste <---code works up to this point
If Me![EndTime] <> "" Then
Me.Clock.SetFocus
Else
Me.EndTime1.SetFocus
End If
End With
End Sub
I'm building a form with an active clock that tracks the current time via a text box. This works like a charm. It's constantly running unless the user stops the clock with a button. When the command button is selected it copies and pastes the "paused" time into another field so this data can be stored so the user can go back and still use the clock to track time after a break, interuptions, etc.
The first part of the code works fine, but I'm having problems with the second half. My objective is to take the "paused" time and transfer it to field1 then if field1 already contains data it will automatically transfer the updated time to the next available field. All in all, I plan on having four fields on the form that will be able to collect the various amounts of time spent on one project.
Any direction or help would be greatly appreciated at this point. Thanks!
--------------------------
Private Sub SaveTime_Click()
Me.TimerInterval = 0
With Me.Clock
.Visible = True
.SetFocus
DoCmd.RunCommand acCmdCopy
Me.SaveTime.SetFocus
Me.EndTime.SetFocus
DoCmd.RunCommand acCmdPaste <---code works up to this point
If Me![EndTime] <> "" Then
Me.Clock.SetFocus
Else
Me.EndTime1.SetFocus
End If
End With
End Sub