S
scuba79
I'm trying to update a field of a specific record via a command button.
However, I keep getting an error message stating "invalid operation".
Here is the code that I'm using with the command button.
Private Sub btnApplyInterviewer_Click()
Dim dbs As Database, rst As DAO.Recordset, strSql As String
On Error GoTo btnApplyInterviewer_Err
strSql = "UPDATE Rating SET InterviewerID = " &
cboNewInterviewer.Value & " WHERE RatingID = " & NotesMod.SignalID
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset(strSql, dbOpenDynaset)
btnApplyInterviewer_Exit:
If Not rst Is Nothing Then rst.Close
If Not dbs Is Nothing Then dbs.Close
Exit Sub
btnApplyInterviewer_Err:
MsgBox Err.Description
Resume btnApplyInterviewer_Exit
Any assistance in pointing me in the right direction is greatly appreciated.
However, I keep getting an error message stating "invalid operation".
Here is the code that I'm using with the command button.
Private Sub btnApplyInterviewer_Click()
Dim dbs As Database, rst As DAO.Recordset, strSql As String
On Error GoTo btnApplyInterviewer_Err
strSql = "UPDATE Rating SET InterviewerID = " &
cboNewInterviewer.Value & " WHERE RatingID = " & NotesMod.SignalID
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset(strSql, dbOpenDynaset)
btnApplyInterviewer_Exit:
If Not rst Is Nothing Then rst.Close
If Not dbs Is Nothing Then dbs.Close
Exit Sub
btnApplyInterviewer_Err:
MsgBox Err.Description
Resume btnApplyInterviewer_Exit
Any assistance in pointing me in the right direction is greatly appreciated.