logging job times

M

Michelle

I am partway through my jobbing db and need to be able to log the job start
and finish times to which employee and activity.
I assumed I could modify another code I was given for something similar -
but I have done something wrong somewhere.
The code is as followes - any help appreciated


thanks

michelle

Option Explicit
Dim dteStartJob As Time

dteStartJob = Now
cmdStopJob.Visible = True
[AControl].SetFocus
cmdStartJob.Visible = False

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
 
Top