Bonjour
pour un premier message merci de m'accorder votre aide précieuse malgré que je sois un néophyte en la matière.
Base Access 2010
Excel 97 2003
je souhaite afficher une liste dans un user forme, les données provienne d'une table 'ENTRE' dans le champ 'BLF' est >1.
USERFORME
If TextBox1 = 1 Then execut2 ("SELECT Date,'','','',blf from entre where blf >1 order by blf asc")
If IsArray(tablo) = True Then
ams1.List = tablo
ams1.AddItem 0, 0
End If
FONCTION COMMUNE
Public Function execut2(sql As String)
Dim aa, x, y
tablo = ""
Set rs = cn.Execute(sql)
If rs.BOF = True Then rs.Close: Exit Function
aa = rs.GetRows
rs.Close
ReDim tablo(UBound(aa, 2), UBound(aa, 1))
For y = 0 To UBound(aa, 2)
For x = 0 To UBound(aa, 1)
tablo(y, x) = aa(x, y)
Next
Next
End Function
OU SONT MES ERREURS CAR CELA NE FONCTIONNE PAS??
Merci de votre aide