Bonjour,
Ce code fonctionne mais je n'arrive pas à ajouter un critère
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 Dim ANNEE As String Dim TRIMESTRE As String Dim rec As DAO.Recordset Dim sql As String ANNEE = Me.ANNEES_XLS TRIMESTRE = Me.TRIMESTRE sql = "SELECT ANNEE FROM TBL_NOTATION_PRIME WHERE TBL_NOTATION_PRIME.ANNEE = " & ANNEE Set rec = CurrentDb.OpenRecordset(sql) If Not rec.EOF Then MsgBox "Il y a qqch" Else MsgBox "Il n'y a rien" End If
TBL_NOTATION_PRIME.ANNEE = & ANNEE And N_TRIMESTRE= " & TRIMESTRE
Cela ne fonctionne pas je n'arrive pas à solutionner !
Merci d'avance si qqn peut m'aider
Partager