Trying to create a form that updates FinishWork for employee. However getting a error.
Important remark, the data type of ID in EmpList is Short Text and cannot be changed.
Code:
Private Sub btnFinishWork_Click()
' MsgBox cboID
' MsgBox txtFinishWork
CurrentDb.Execute "UPDATE EmpList " & _
" SET FinishWork =" & txtFinishWork.Value & _
" WHERE FinishWork Is Null AND ID =" & cboID.Value & ";"
Me.Requery
End Sub
Last edited: