1 2 3 4 5 6 7 8 9 10 11 12 13
| Private Sub REFERENCE_LostFocus()
Dim res As String, res1 As String
Dim Msg, Style, Title, Response, MyString
Msg = "CET APPAREIL EXISTE DEJA, SOUHAITEZ-VOUS EN MODIFIER LE PRIX?"
Style = vbYesNo + vbCritical
Title = "ATTENTION"
Response = MsgBox(Msg, Style, Title)
IIf (res = DLookup([MODELE],[APPAREILS], Me.MODELE) And res1 = DLookup([REFERENCE], [APPAREILS], Me.REFERENCE),response=MsgBox (msg,style,title),Docmd.GotoControl ([COULEUR]))
If Response = vbOK Then
DoCmd.OpenTable [APPAREILS], acViewNormal, acEdit
Else: DoCmd.RunCommand acCmdUndo
End If
End Sub |
Partager