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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
Private Sub Screen_Action_AfterUpdate()
Dim strSql As String
Dim dbBdeD As Database
Dim Screen As Object
Set dbBdeD = CurrentDb
strSql = "SELECT Code_Software FROM tbAction WHERE Id_Domaine = " & Me.Screen_domaine & _
" and id_action = " & Me.Screen_Action & ";"
Set rstCurseur = dbBdeD.OpenRecordset(strSql, dbOpenSnapshot)
If rstCurseur.RecordCount = 0 Then
Me.Param_Action = "Tous"
Else
With rstCurseur
Me.Param_Action = Trim(.Fields(0).Value)
End With
End If
If Me.Param_activite = "Tous" Then
strSql = "SELECT Index, Type, Domaine, Action, " & _
"Taille, Libellé, Unité, Service," & _
"Prorata, Valeur, Champ11, entité," & _
"[Service GTS], [Date Application] " & _
"FROM [Base de Calcul] "
GoTo suite
End If
If Me.Param_domaine = "Tous" Then
strSql = "SELECT Index, Type, Domaine, Action, " & _
"Taille, Libellé, Unité, Service," & _
"Prorata, Valeur, Champ11, entité," & _
"[Service GTS], [Date Application] " & _
"FROM [Base de Calcul] " & _
"WHERE Type= '" & Me.[Param_activite] & "'"
GoTo suite
End If
If Me.Param_Action = "Tous" Then
strSql = "SELECT Index, Type, Domaine, Action, " & _
"Taille, Libellé, Unité, Service," & _
"Prorata, Valeur, Champ11, entité," & _
"[Service GTS], [Date Application] " & _
"FROM [Base de Calcul] " & _
"WHERE Type= '" & Me.[Param_activite] & "' AND Domaine = '" & Me.[Param_domaine] & "'"
GoTo suite
End If
strSql = "SELECT Index, Type, Domaine, Action, " & _
"Taille, Libellé, Unité, Service," & _
"Prorata, Valeur, Champ11, entité," & _
"[Service GTS], [Date Application] " & _
"FROM [Base de Calcul] " & _
"WHERE Type= '" & Me.[Param_activite] & "' AND Domaine = '" & Me.[Param_domaine] & "' AND " & _
"Action= '" & Me.[Param_Action] & "'"
suite:
Forms!["FAbaque"]!["sFAbaque"].Form.RecordSource = strSql
Me.Refresh
End Sub |
Partager