voila je vien en dernier recours et jai besoin daide : voici ma fonction ...
Public Function get_id(marequete As String, nomchamp As String) As Integer
'mes variables
Dim recordset As New ADODB.recordset
Dim bool As Boolean
If recordset.ActiveConnection Is Nothing Then recordset.ActiveConnection = SQLSRVDATA.EASYMED.ConnectionString
recordset.Source = marequete
recordset.Open , , adOpenStatic, adLockReadOnly
MsgBox (recordset.RecordCount)
recordset.MoveLast
If recordset.RecordCount = -1 Then
get_id = 1
Else
recordset.MoveFirst
'trouver le nom du champ
'---- le probleme est a ce niveau il ne trouve pa l'objet----
get_id = recordset!nomchamp
recordset.MoveNext
'---parourir le recordset
Do While recordset.EOF = False And bool = False
If get_id + 1 = recordset!nomchamp Then
get_id = recordset!nomchamp
Else
get_id = get_id + 1
bool = True
End If
recordset.MoveNext
Loop
End If
End Function
sil vous plait de laide ou une piste, merci davance