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
| Dim entX As Integer
Dim entY As Integer
If Not rstEnregistrement.EOF Then
If Me.FormatCount = 1 Then
For entX = 1 To NbColonnes
Me("Detail" + Format(entX)) = Nz(rstEnregistrement(entX - 1), 0)
Next entX
For entX = NbColonnes + 1 To Nombre_colonnes
Me("Detail" + Format(entX)).Visible = False
Next entX
If Me.Detail1.Value = "zIPR" Then
Me.Detail1.Value = "IPR"
For entY = 2 To NbColonnes
If Me("Detail" + Format(entY)).Value >= 0 And Me("Detail" + Format(entY)).Value < 7 Then
Me("Detail" + Format(entY)).BackColor = RGB(25, 217, 204)
ElseIf Me("Detail" + Format(entY)).Value >= 7 And Me("Detail" + Format(entY)).Value < 16 Then
Me("Detail" + Format(entY)).BackColor = RGB(102, 230, 128)
ElseIf Me("Detail" + Format(entY)).Value >= 16 And Me("Detail" + Format(entY)).Value < 25 Then
Me("Detail" + Format(entY)).BackColor = RGB(255, 153, 0)
ElseIf Me("Detail" + Format(entY)).Value >= 25 And Me("Detail" + Format(entY)).Value < 36 Then
Me("Detail" + Format(entY)).BackColor = RGB(255, 230, 89)
ElseIf Me("Detail" + Format(entY)).Value >= 36 Then
Me("Detail" + Format(entY)).BackColor = RGB(255, 0, 0)
End If
Next entY
End If
rstEnregistrement.MoveNext
End If
End If
End Sub |
Partager