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
| Private Sub Dépannage_AfterUpdate()
If Me.Dépannage Then
Me.Réparation.Locked = True
Me.Travaux.Locked = True
Me.Visite_Legale_d_Entretien.Locked = True
End If
End Sub
Private Sub Réparation_AfterUpdate()
If Me.Réparation Then
Me.Dépannage.Locked = True
Me.Travaux.Locked = True
Me.Visite_Legale_d_Entretien.Locked = True
End If
End Sub
Private Sub Travaux_AfterUpdate()
If Me.Travaux Then
Me.Dépannage.Locked = True
Me.Réparation.Locked = True
Me.Visite_Legale_d_Entretien.Locked = True
End If
End Sub
Private Sub Visite_Legale_d_Entretien_AfterUpdate()
If Me.Visite_Legale_d_Entretien Then
Me.Dépannage.Locked = True
Me.Réparation.Locked = True
Me.Travaux.Locked = True
End If
If Me.Visite_Legale_d_Entretien And Me.Simple Then
Me.[Date_prochaine_intervention] = DateAdd("d", 42, Me.[Date__intervention])
End If
If Me.Visite_Legale_d_Entretien And Me.Etendu Then
Me.[Date_prochaine_intervention] = DateAdd("d", 42, Me.[Date__intervention])
End If
If Me.Visite_Legale_d_Entretien And Me.Deux_visites Then
Me.[Date_prochaine_intervention] = DateAdd("d", 183, Me.[Date__intervention])
End If
If Me.Visite_Legale_d_Entretien And Me.Quatre_Visites Then
Me.[Date_prochaine_intervention] = DateAdd("d", 92, Me.[Date__intervention])
End If
End Sub |