Bonjour,
J'ai une requète que j'exporte sous un modéle word :
Cette requète me créé plusieurs lignes dont certaine sont identique et j'aimerais remplir un tableaux qui contient plusieurs signet (compte0, compte1, compte2...).
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 tmp = "SELECT ClientTest.*, Enfants.*, ClientTest.id_client, Crédits.*, Comptes_Bancaires.*, Finance.*, Biens_Immo.* " tmp = tmp & "FROM ((((ClientTest LEFT JOIN Enfants ON ClientTest.id_client=Enfants.[id_client]) " tmp = tmp & "LEFT JOIN Crédits ON ClientTest.id_client=Crédits.[id_client]) " tmp = tmp & "LEFT JOIN Comptes_Bancaires ON ClientTest.id_client=Comptes_Bancaires.[id_client]) " tmp = tmp & "LEFT JOIN Biens_Immo ON ClientTest.id_client=Biens_Immo.[id_client]) " tmp = tmp & "LEFT JOIN Finance ON ClientTest.id_client=Finance.[id_client] " tmp = tmp & "WHERE ([ClientTest.id_client] = " tmp = tmp & Forms![Start]![ListeClient] & ") ORDER BY ClientTest.id_client;"
Par exemple si Mon Client a 2 enfants (table enfants) et 3 compte en banque(table compte_bancaire) cela me sortira 2 * 3 = 6 enregistrement dont certains se répéteront
Comment faire une boucle sur le champ voulue tout en évitant les doublons ?
Cordialement,
Brezz
Partager