Sabtu, 18 Maret 2017

Re: [MS_AccessPros] Form Error Handling

 

OK thank you!
Please ignore my other reply.  thank you!


---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

David-

See this:


The critical sentence is:

This includes Microsoft Access database engine errors, but not run-time errors in Visual Basic or errors from ADO.

So, if you force a save from code, your code is responsible for trapping the error.  A duplicate record error gets trapped in the Error procedure only when the user does something to force a save in the UI - like move to another record.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Mar 18, 2017, at 3:41 PM, david.pratt@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



If I am understanding all of this, Form_Error is not triggered when I try to use a cmd button to save a new record that is a duplicate?  and in order to trigger the custom error message, it has to be triggered specifically from the sub which is executing the save record?

I guess I don't understand in general when Form_Error is triggered.  In my mind it seems logical that it would be triggered anytime a user tries to save a duplicate record, no matter where the save_record was initiated from.



__._,_.___

Posted by: david.pratt@outlook.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (8)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar