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
| Private Sub Form_Timer()
Dim H As Date
Dim sHeure As String
Dim lHeure As Long
H = Time
sHeure = Hour(H)
Select Case Minute(H)
Case 0 To 9
sHeure = sHeure & "0" & Minute(H)
Case Else
sHeure = sHeure & Minute(H)
End Select
Select Case Second(H)
Case 0 To 9
sHeure = sHeure & "0" & Second(H)
Case Else
sHeure = sHeure & Second(H)
End Select
lHeure = CLng(sHeure)
Debug.Print sHeure
If lHeure >= 35500 Then
MontrerFormAlerte True
End If
End Sub
Sub MontrerFormAlerte(FermerBase As Boolean)
If FermerBase Then
DoCmd.OpenForm "FormAlerteQuitter", acNormal, , , , acDialog, FermerBase
End If
End Sub |
Partager