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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
Public Function Support(Projet As Long, Projet1 As Long) As String
Dim res As DAO.Recordset
Dim SQL As String
Dim tempSupport As String
Dim tempExpo As String
'Selectionne les participant du projet
SQL = "SELECT Support FROM Support WHERE Chrono=" & Projet
Set res = CurrentDb.OpenRecordset(SQL)
'Concatene les différents enregistrement
While Not res.EOF
tempSupport = tempSupport & res.Fields(0).Value & " + "
res.MoveNext
Wend
'Enleve le dernier espace
'libere la mémoire
Dim SQL1 As String
Dim var As String
var = "Présentation autour de la maquette"
'Selectionne les participant du projet
SQL1 = "SELECT Expose FROM Expose WHERE Chrono= " & Projet1 & " And Expose<>'Présentation autour de la maquette'"
Set result = CurrentDb.OpenRecordset(SQL1)
'Concatene les différents enregistrement
While Not result.EOF
tempExpo = tempExpo & result.Fields(0).Value & " + "
result.MoveNext
Wend
Support = tempSupport + tempExpo
Support = Left(Support, Len(Support) - 3)
'Enleve le dernier espace
'libere la mémoire
Set result = Nothing
Set res = Nothing
End Function |
Partager