Problem in OnAfterCahnge event - InfoPath Dev Sign in | Join | Help in Code InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Code » Problem in OnAfterCahnge event Problem in OnAfterCahnge event Last post 02-16-2006 05:24 AM by vt_asparagus. 1 replies. Page 1 of 1 (2 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 02-14-2006 10:50 PM liorlankri Joined on 02-28-2005 Posts 205 Problem in OnAfterCahnge event Reply Contact I Have a text box and I write this code in the OnBeforeChange Event:If eventObj.IsUndoRedo Then Exit Subend ifIf eventObj.Operation="Delete" Then Exit Subend ifdim str1str1=eventObj.NewValueif len(str1)<4 theneventObj.ReturnStatus=falseeventObj.ReturnMessage="should be more than 4"end ifThat code work. But when I write the same code in the OnAfterChange Event I dont get the ReturnMessage. I get it only if I change it to:XDocument.UI.Alert("should be more than 4")Why it's happen??? 02-16-2006 05:24 AM In reply to vt_asparagus Joined on 08-05-2005 USA Posts 285 Re: Problem in OnAfterCahnge event Mark as Not AnswerMark as Answer... Reply Contact Becuase the return message is in OnBeforeChange to send a user a message if you are not going to allow the change to continue. In the case of OnAfterChange, the change has been committed to the DOM. Jasonhttp://www.k2distillery.com/ Page 1 of 1 (2 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.