Hi everyone,
Could someone glance at the code below very quickly and help me find where the mismatch is? I have tried both string and integer data types for the variable, to no avail. When I update the combo box, I get the data type mismatch error for some reason that I cannot figure out. I have been banging my head against a wall trying to find my mistake.
Code:
Private Sub Combo702_AfterUpdate()
On Error GoTo Combo702Error
Dim intX As Integer
intX = "UPDATE tblIncidents SET ClassificationID = Null WHERE InternalIncidentID = '" & Me.InternalIncidentID & "';"
CurrentDb.Execute intX, dbFailOnError
intX = "INSERT INTO tblIncidents (ClassificationID) SELECT ClassificationID FROM tblClassifications WHERE ClassificationID = '" & Me.Combo702 & "';"
CurrentDb.Execute intX, dbFailOnError
ExitCombo702:
Exit Sub
Combo702Error:
MsgBox Err & ": " & vbCrLf & Err.Description
Resume ExitCombo702
End Sub