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
| Private Sub Valider_Click()
Dim strMsg As String, strTitre As String
Dim intStyle As Integer
If (Me![Total reçu]) <> (Me![Unités commandées]) Then
strMsg = " La réception n'est pas totale!Si vous validez, vous ne pourrer plus receptionner le reliquat. Voulez-vous valider?"
intStyle = vbYesNo + vbQuestion + vbDefaultButton2
strTitre = "Attention"
MsgBox strMsg, intStyle, strTitre
If vbYes Then
DoCmd.Close acForm, "Réception de commande"
DoCmd.OpenQuery "Requête réception finale", acViewNormal, acEdit
DoCmd.Close acForm, "Dialogue réception de commandes"
End If
Else
DoCmd.Close acForm, "Réception de commande"
DoCmd.OpenQuery "Requête réception finale", acViewNormal, acEdit
DoCmd.Close acForm, "Dialogue réception de commandes"
Exit Sub
End If
End Sub |
Partager