<i><font color="#663300">This is the code in my bo_mAccounts in BeforeSave(). Whereas the messagebox() did show the message the coresponding AddToErrorMsg() for this BO does not display the message, just does not do anything due the the RETURN .F. In a different BO BeforeSaveValidation() does show such a message.</font></i>
Business objects should <b><i>not</i></b> display any messages; they are not part of the presentation layer. All that should happen in your BeforeSave() is that the bizobj's cErrorMsg property is updated to include your error message. Returning .F. from the BeforeSave() means that the bizobj will return FILE_CANCEL to the bizobjform's Save(). The code in the bizobjform will then ask the bizobj if there is an error message, and call the DisplayErrorMsg() method if there is, where the default behavior is to display a message box.
If this isn't happening, you need to step through the code to determine where this chain of events is being broken. <font color="#cc0000"> ___/ / __/ / ____/</font> Ed Leafe ©2002 Ed Leafe |