Oui j'ai essayé et modifié le code que voici :
Set Rs = MySQL_Select(Connexion, "*", "adm_clesactivation", "Codes='" & T_CodeCle & "'", , "NumId")
If Rs.RecordCount > 0 Then
If Rs("Activer") = "Oui" And Rs("UserCode") <> "" And Rs("Valider") <> "" And Rs("Perimer") <> "" Then
MsgBox "Le code EXISTE et est déjà UTILISE", vbExclamation
Else
MsgBox "Le code EXISTE mais n'est pas encode utilisé", vbInformation
End If
Else
MsgBox "Le code n'existe PAS !", vbCritical
End If
Rs.Close
Ma connexion est :Set Connexion = New ADODB.Connection
Connexion.CursorLocation = adUseClient
Connexion.ConnectionString = "DRIVER={MySQL ODBC 5.2w Driver};SERVER=127.0.0.1; Database=db_jaber;UID=root;PWD=;"
Connexion.Open
Le MySQL_Select :Public Function MySQL_Select(ByRef MySQL_Conn As ADODB.Connection, ByVal Fields As String, ByVal Table As String, Optional ByVal Where As String, Optional ByVal Group As String, Optional ByVal Order As String) As Recordset
Dim strSQL As String
'Select string
strSQL = "SELECT " & Fields & " FROM " & Table
If Where <> "" Then strSQL = strSQL & " WHERE " & Where
If Group <> "" Then strSQL = strSQL & " GROUP BY " & Group
If Order <> "" Then strSQL = strSQL & " ORDER BY " & Order
Set MySQL_Select = New Recordset
MySQL_Select.CursorLocation = adUseServer
MySQL_Select.Open strSQL, MySQL_Conn
End Function
Mais en fait, afficher les éléments dans le tableau n'est pas un problème, je voudrais parcourir le tableau... et là je n'y arrive pas.
Là, j'ai parcouru la table... pas le tableau.