M
Michelle
Can you please have a look at the code below and tell me where I have gone
wrong.
I need to be able to log the start and stop times of each job and use those
times to calculate costing of job and payroll figs.
Am a virtual beginner at Access - based this code on another I was given for
a logon page.
Option Explicit
Dim dteStartJob As Time
Private Sub cmdStartJob_Click()
End Sub
Private Sub cmdStartJob_Click()
dteStartJob = Now
cmdStopJob.Visible = True
[AControl].SetFocus
cmdStartJob.Visible = False
End Sub
Private Sub cmdStopJob_Click()
Dim strSQL As String
strSQL = "Insert into tblJobTimes(TimeStartJob, TimeStopJob)Values (#" &
dteStartJob & "#,#" & Now & "#);"
CurrentDb.Execute strSQL, dbFailOnError
cmdStartJob.Visible = True
[AControl].SetFocus
cmdStopJob.Visible = False
End Sub
wrong.
I need to be able to log the start and stop times of each job and use those
times to calculate costing of job and payroll figs.
Am a virtual beginner at Access - based this code on another I was given for
a logon page.
Option Explicit
Dim dteStartJob As Time
Private Sub cmdStartJob_Click()
End Sub
Private Sub cmdStartJob_Click()
dteStartJob = Now
cmdStopJob.Visible = True
[AControl].SetFocus
cmdStartJob.Visible = False
End Sub
Private Sub cmdStopJob_Click()
Dim strSQL As String
strSQL = "Insert into tblJobTimes(TimeStartJob, TimeStopJob)Values (#" &
dteStartJob & "#,#" & Now & "#);"
CurrentDb.Execute strSQL, dbFailOnError
cmdStartJob.Visible = True
[AControl].SetFocus
cmdStopJob.Visible = False
End Sub