A voir également:
- [VBA Access] sommer des resultats de requetes
- Resultats foot - Télécharger - Vie quotidienne
- Lexer resultats - Télécharger - Sport
- Archives résultats bac 1998 ✓ - Forum Réseaux sociaux
- Acer quick access - Forum logiciel systeme
- Désinstaller ACER QUICK ACCESS - Forum Logiciels
4 réponses
Pour simplifier la procédure il faudrait que le champ contenant la valeur à récupérer ai le même nom
Sinon
Voici un début de procédure
Sub compte()
Dim req As QueryDef
Dim db As Database
Dim rst As Recordset
Dim total As Integer
Set db = CurrentDb
i = 1
For Each req In db.QueryDefs
If Left(req.Name, 1) = "A" Then
Set rst = db.OpenRecordset(req.Name)
total = total + rst![sommedeb]
End If
Next
MsgBox total
End Sub
Sinon
Voici un début de procédure
Sub compte()
Dim req As QueryDef
Dim db As Database
Dim rst As Recordset
Dim total As Integer
Set db = CurrentDb
i = 1
For Each req In db.QueryDefs
If Left(req.Name, 1) = "A" Then
Set rst = db.OpenRecordset(req.Name)
total = total + rst![sommedeb]
End If
Next
MsgBox total
End Sub