Excusez moi! En fait ça marche mais ça l affiche dans l execution de VBA. J aimerais que quand je click qur un bouton dans un formulaire, on voit le resultat s'afficher . On fait comment ?
Merci

Amaya

-------------------------------
Réponse au message :
-------------------------------
>
> Bonjour à tous
>
> Maintenant ma requete n'a plus d erreur de compilation mais elle ne renvoie rien !! Si quelqu un voit pourquoi !!
>
> Merci
>
>
>
> > > Private Sub Commande21_Click() > > Dim RS As Recordset > Dim Rsql As String > Dim Champ As Field > Dim text$ > Rsql = " SELECT PRODUCTION.DateCdePRod, composant.CodeComp,composant.typeComp," & _ > " Sum([qtécompPdt]*[qttedme]) AS nombre_composants FROM " & _ > "ligneproduction, PRODUIT, produit_composer, composant,production WHERE " & _ > " PRODUIT.CodePdt = produit_composer.CodePdt And PRODUCTION.Numprod=LigneProduction.NumBP and " & _ > " PRODUIT.CodePdt = ligneproduction.NumProd And composant.codeComp = " & _ > " produit_composer.codeComp AND Production.NumProd=70 GROUP BY " & _ > " PRODUCTION.DateCdePRod,composant.CodeComp,composant.typeComp order by composant.typeComp ; " > Set RS = Application.CurrentDb.OpenRecordset(Rsql, dbOpenDynaset) > RS.MoveFirst > Do While RS.EOF = False > text = " " > For Each Champ In RS.Fields > text = text & Champ.Value & vbTab > Next Champ > Debug.Print text > RS.MoveNext > Loop > RS.Close > Set RS = Nothing > Set Champ = Nothing > End Sub > > |
>
>
>

Amaya
