Bonsoir,
j'ai créé une base fenwick. Sur mon champ Date j'ai indexé Oui - Sans doublons.
Je voudrais un message d'alerte sur mon formulaire quand je saisie une date qui a déjà été saisie.
J'ai placé ce code sur mon champ Date.
Aucun message n'apparait.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 Private Sub Date_BeforeUpdate(Cancel As Integer) If Not IsNull(DLookup("[Date]", "fenwick", "[Date]=" & Me.Date)) Then MsgBox "blabla" End If End Sub
Merci.
Partager