Private Sub del_Click() On Error GoTo err If CodeClient.Text = "" Then MsgBox "Selectez le client!" Else If (MsgBox("Confirmez la Suppression du Client [" & ListC.TextMatrix(ListC.RowSel, 0) & "]?", vbYesNo + vbQuestion, "Suppression") = vbYes) Then Call Connect mobjrec.SQL "Delete from CLIENTIS where IDClient" & ListC.TextMatrix(ListC.RowSel, 0) & ";" mobjrec.RSOpen Call Deconnect ListC.RemoveItem ListC.RowSel End If End If GoTo fin err: MsgBox "Tu ne puex pas supprimer[" & ListC.TextMatrix(ListC.RowSel, 0) & "], deja utilise", vbInformation, "Erreur" fin: End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
si l'ID est dans la première colonne :
mobjrec.SQL "Delete from CLIENTS where IDClient " & msI.TextMatrix(msI.RowSel, 0) & ";"