J
Jero
Hi,
I have a list called lstResult with 4 columns. The first column contain the
ID's.
I want to delete the selected row by using sql, but when i try to do that,
then I received this error:
Error '3464'
Data type mismatch in criteria expression.
//This is the code:
Private Sub btn_Delete_Click()
Dim Id
Id = CVar(Me.lstResult.Column(0, Me.lstResult.ListIndex))
If IsNull(Me.lstResult) Then
MsgBox "No selection."
End If
DoCmd.RunSQL ("Delete * FROM Employee WHERE User_ID = '" & Id & "' ")
Me.lstResult.Requery
End Sub
I have a list called lstResult with 4 columns. The first column contain the
ID's.
I want to delete the selected row by using sql, but when i try to do that,
then I received this error:
Error '3464'
Data type mismatch in criteria expression.
//This is the code:
Private Sub btn_Delete_Click()
Dim Id
Id = CVar(Me.lstResult.Column(0, Me.lstResult.ListIndex))
If IsNull(Me.lstResult) Then
MsgBox "No selection."
End If
DoCmd.RunSQL ("Delete * FROM Employee WHERE User_ID = '" & Id & "' ")
Me.lstResult.Requery
End Sub