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
| Private Sub actualisation()
Dim rst As DAO.Recordset
Dim str As String
Dim cpt_recir_videocodage As Integer
Dim cpt_recir_machine As Integer
'Mise à jour recirculation videocodage
str = "SELECT Last(dbo_vwSorterLoad.VCSQueue) AS [colis en attente videocodage] From dbo_vwSorterLoad;"
Set rst = CurrentDb.OpenRecordset(str, dbOpenDynaset)
cpt_recir_videocodage = rst(0)
Texte_nbre_colis_videocodage.Value = cpt_recir_videocodage
rst.Close
Set rst = Nothing
'Mise à jour couleur signal videocodage
Select Case cpt_recir_videocodage
Case 0 To 99
signal_videocodage.BackColor = 65280 'vert
Case 100 To 199
signal_videocodage.BackColor = 33023 ' orange
Case Else
signal_videocodage.BackColor = 255 ' rouge
End Select
' mise à jour recirculation machine
str = "SELECT Last(dbo_vwSorterLoad.Recirc) AS [colis en recirculation] From dbo_vwSorterLoad;"
Set rst = CurrentDb.OpenRecordset(str, dbOpenDynaset)
cpt_recir_machine = rst(0)
Texte__nbre_de_colis_en_recirculation.Value = cpt_recir_machine
rst.Close
Set rst = Nothing
'Mise à jour couleur signal recirculation machine
Select Case cpt_recir_videocodage
Case 0 To 99
signal_recirculation.BackColor = 65280 'vert
Case 100 To 199
signal_recirculation.BackColor = 33023 ' orange
Case Else
signal_recirculation.BackColor = 255 ' rouge
End Select
End Sub |
Partager