I have a problem with
VB Recordset.recordcount property
it always return (-1) here is my code:
Private Sub del_cmd_Click()
If IDText.Text = "" Then
MsgBox "Enter the ID number first ..."
Else
Sql = "select count(*) from Activ where ACTIV_ID = " & Text1.Text
CN.Execute Sql
End If
MsgBox rs.RecordCount
If rs.RecordCount = 0 Then
MsgBox "The ID number is not found ..."
Else
n = MsgBox("Are you sure you want to delete record? ", vbOKCancel)
If n = 1 Then
Sql = "delete from Activ where ACTIV_ID = " & IDText.Text
CN.Execute Sql
MsgBox "Record deleted..."
End If
End If
End Sub