Hello Again
I’m trying to update a record in a datatable using an SQL string with the update instruction in it. Unfortunately nothing appears to be happening when the event it is set to trun from is triggered.
Dim dBs As DAO.Database
Dim qDf As QueryDef
Dim TimVar As String
Set dBs = CurrentDb()
TimVar = Now()
dBs.Execute “Update [operator breakdown entry record] SET [Time_Attended] =” & TimVar & ” Where [job_number] =” & Me.Job_Number
Exit_Sub:
dBs.close
Set dBs = Nothing
Err_Handler:
On Error GoTo Exit_Sub
That’s my code (pretty much stolen in total from the Access help file) and it is set to run when from the on click event for a check box that is on a sub form, the sub form is displayed as continuos forms.
At the moment I can’t even check if the variable is initialising as nothign at at all appears to be happening, I’ve tried the code on a ‘test’ form I use running from a button click event and the result is the same.
Can anyone see where my ‘obvious’ error is please?
Thanks
Ian