1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Dim taBdd As Database
Dim strSQL As String
Dim rst As DAO.Recordset
Dim monTableau() As String
Dim i As Integer
strSQL = "SELECT [FAC_Interface].Accoount, FAC_Magnitude.ACCDesignationF " _
& "FROM [FAC_Interface], [FAC_Magnitude] " _
& "WHERE [FAC_Interface].Compte_Magnitude = FAC_Magnitude.ACC " _
& "AND ((([FAC_Interface].Accoount) LIKE '%" & var1 & "%'));"
Set Db = Application.CurrentDb
Set rst = Db.OpenRecordset(strSQL)
i = 0
ReDim monTableau(rst.RecordCount, 2)
Do While Not rst.EOF
monTableau(i, 1) = rst.Fields("[FAC_Interface].Accoount")
monTableau(i, 2) = rst.Fields("FAC_Magnitude.ACCDesignationF")
rst.MoveNext
i = i + 1
Loop |
Partager