1 2 3 4 5 6 7 8 9 10 11 12 13
| Public Sub COMPTE_NOTE(ByVal ligne As Integer, strsql As String)
Dim strtable As String
Dim strcriteria As String
strtable = "PROFILS, QUESTIONS"
strcriteria = "PROFILS.no_etude = """ & Form_Formulaire2.lst_resultat.Column(0, ligne) & """"
strcriteria = strcriteria & " AND PROFILS.no_etude = QUESTIONS.no_etude AND PROFILS.question = QUESTIONS.question"
strsql = "SELECT PROFILS.no_etude, PROFILS.no_produit, PROFILS.no_conso, PROFILS.question, QUESTIONS.type_question, QUESTIONS.modalite_min, QUESTIONS.modalite_max, PROFILS.note, Count(PROFILS.note) AS CompteDenote "
strsql = strsql + " FROM " & strtable
strsql = strsql + " WHERE ((" & strcriteria & "))"
strsql = strsql & " GROUP BY PROFILS.no_etude, PROFILS.no_produit, PROFILS.no_conso, PROFILS.question, QUESTIONS.type_question, QUESTIONS.modalite_min, QUESTIONS.modalite_max, PROFILS.note;"
End Sub |