i had built a form to add orders , and while adding orders i specify the article number of the item and the quantity and in that way i'm adding items to my stock.
In that form i have a primary key (article number).
so if i tried to add another article with the same article number an prompt error form the access is popping up.
i wanted to write my own alert message !
so i wrote this :
that works fine , the prompt message pop up and when i click ok and i changed the article number to a valid on it works.
but the question : what if i changed my mind and i don't wanna add anymore articles to the order??! the error still and i need to close the form and reopened it again ! any help please
In that form i have a primary key (article number).
so if i tried to add another article with the same article number an prompt error form the access is popping up.
i wanted to write my own alert message !
so i wrote this :
Code:
Private Sub article_AfterUpdate()
On Error GoTo Err_article_AfterUpdate
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Exit_article_AfterUpdate:
Exit Sub
Err_article_AfterUpdate:
'MsgBox Err.Description
MsgBox Prompt:="This article is already entered. Please choose another article number"
Resume Exit_article_AfterUpdate
End Sub
but the question : what if i changed my mind and i don't wanna add anymore articles to the order??! the error still and i need to close the form and reopened it again ! any help please
Comment