1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
...
...
'Message qui confirme l'ajout
MsgBox "Vous venez de créer une nouvelle ligne dans la table Stock!", vbInformation
'Vérification des stock réels vs seuil de reappro
Dim oDb As DAO.database
Dim oRst As DAO.Recordset
Set oDb = CurrentDb
Set oRst = oDb.openrecordset("R-Alerte Stock")
With oRst
.findfirst BuildCriteria("RéfArticle", dbinteger, Me.Modifiable5)
If Not .nomatch Then
oDb.Execute "UPDATE ARTICLE SET ACOMMANDER=TRUE WHERE RéfArticle=" & Me.Modifiable5
MsgBox "Le stock réel a dépassé le seuil d'appro, l'article est à commander"
End If
End With |
Partager