Hi
There is a problem , The program is generate the new record and not exits from the sub.
I need that when it comes to :
DoCmd.GoToRecord acDataForm, "Test", acNewRec
so if there is an error in this line it will show the error message and won't run this command but it will exit the sub