I am still working away on this form and now I am ecountering an error with the delete code portion. I believe it is having a problem recognizing what I am selecting but I could be wrong. The error message reads RUN TIME ERROR 3265 ITEM NOT FOUND IN THIS COLLECTION
The whole code reads:
Private Sub cmdDelete_Click()
'delete record
'check existing selected record
If Not (Me.TableSub.Form.Recordset.EOF And Me.TableSub.Form.Recordset.BOF) Then
'confirm delete
If MsgBox("Are you sure you want to delete this record?", vbYesNo) = vbYes Then
'delete now
CurrentDb.Execute "DELETE FROM KWTable WHERE text_key='" & Me.TableSub.Form.Recordset.Fields ("text_key") & "'"
'refresh data in list
Me.TableSub.Form.Requery
End If
End If
End Sub
And the portion that is highlighted is:
CurrentDb.Execute "DELETE FROM KWTable WHERE text_key='" & Me.TableSub.Form.Recordset.Fields ("text_key") & "'"