1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| Private Sub ChercheGeneration(oNode As Node, intGeneration As Integer)
If Not oNode.Parent Is Nothing Then
intGeneration = intGeneration + 1
'Appeler la procédure pour le parent
ChercheGeneration oNode.Parent, intGeneration
End If
End Sub
Private Sub TrwMenu_NodeClick(ByVal Node As Object)
Dim Generation As Integer
Dim nodClient As Node
Dim MonCritere As String
Dim Extract As String
Dim MonNum As String
ChercheGeneration TrwMenu.SelectedItem, Generation
If Generation = 4 Then
Set nodClient = Node
Extract = nodClient.Key
MonNum = Mid(Extract, 2)
Forms![frm_Historique]![ssfrmHistoriqueListeAppellationDetail].Visible = True
MonCritere = "SELECT rqy_Historique.NumCave, rqy_Historique.Appellation, rqy_Historique.Annee, rqy_Historique.Type, rqy_Historique.Domaine, rqy_Historique.ClimatEtInfo, Avg(rqy_Degustation.Note) AS MoyenneDeNote, rqy_Historique.NumVin, rqy_Historique.CompteDeNumCave, tbl_AppellationComplete!NumAppellationComplete & tbl_Cave!Annee & tbl_Cave!NumVin AS NumAppellationCompleteEtAnneeEtNumVin FROM rqy_Historique LEFT JOIN rqy_Degustation ON rqy_Historique.NumCave = rqy_Degustation.NumCave GROUP BY rqy_Historique.NumCave, rqy_Historique.Appellation, rqy_Historique.Annee, rqy_Historique.Type, rqy_Historique.Domaine, rqy_Historique.ClimatEtInfo, rqy_Historique.NumVin, rqy_Historique.CompteDeNumCave, tbl_AppellationComplete!NumAppellationComplete & tbl_Cave!Annee & tbl_Cave!NumVin HAVING ((tbl_AppellationComplete!NumAppellationComplete & tbl_Cave!Annee & tbl_Cave!NumVin)="
Forms.frm_Historique.ssfrmHistoriqueListeAppellationDetail.Form.RecordSource = MonCritere & Chr(34) & MonNum & Chr(34) & ");"
Else
Forms![frm_Historique]![ssfrmHistoriqueListeAppellationDetail].Visible = False
End If
End Sub |
Partager