Bonjour,
J'ai fais un formulaire contenant une combo box qui permet en fonctionde la valeur selectionner de faire une requête sql pour créer un Etat sur l'évent On Click
Dans les propriétés du OpenReport, je ne comprend pas ce qu'il faut mettre dans le champs [Where Condition ]
Voici mon code :
dans le champs Where Condition je ne sais vraiment pas quoi écrire
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 Dim var_grade As String var_grade = cbo_grade.Value sSQL = "SELECT tbl_consultant.nom_complet, tbl_event.Date_debut, tbl_event.Date_fin, tbl_ecole.Nom_complet_Ecole, tbl_grade.Nom_grade, tbl_grade.ID_grade FROM tbl_grade INNER JOIN ((tbl_ecole INNER JOIN tbl_event ON tbl_ecole.ID_ecole = tbl_event.ID_Ecole) INNER JOIN (tbl_consultant INNER JOIN tbl_participation_event ON tbl_consultant.ID_consultant = tbl_participation_event.ID_consultant) ON (tbl_event.ID_event = tbl_participation_event.ID_event) AND (tbl_event.ID_event = tbl_participation_event.ID_event)) ON tbl_grade.ID_grade = tbl_consultant.ID_grade WHERE ((([tbl_participation_event]![Reponse_mail])=-1) AND ((tbl_grade.ID_grade)='" & var_grade & "'));" DoCmd.OpenReport report_test, acViewPreview, ,[whereCondition] 'la je sais pas quoi mettre comme condition
En général qd j'écris un truc ca me sort "Erreur 424 Onject Required"
Bref je suis complétement perdu
Merci de votre aide
ps: dsl la requete est super longue
Partager