<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: submit form using onbeforechange event</title><link>https://www.infopathdev.com:443/forums/thread/13925.aspx</link><pubDate>Mon, 07 Nov 2005 05:45:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13925</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13925.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13925</wfw:commentRss><description>Hi AbsMing,&lt;br /&gt;You can't do Submit in the OnBeforeChange handler since the XML has not yet been updated with the value. Try moving it to the OnAfterChange handler.&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>submit form using onbeforechange event</title><link>https://www.infopathdev.com:443/forums/thread/12662.aspx</link><pubDate>Mon, 07 Nov 2005 01:48:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12662</guid><dc:creator>absMing</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12662.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12662</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;I have a check box which when the user unchecks.  It will set its value to false and then submit this to Access.  however,it is not allowing me submit the form due to "Form cannot be submited: Form does not contain any new data"&lt;br /&gt;&lt;br /&gt;Code is as follows:&lt;br /&gt;function msoxd__Activity_Status_attr::OnBeforeChange(eventObj)&lt;br /&gt;{&lt;br /&gt;try {&lt;br /&gt;	if (eventObj.NewValue != eventObj.OldValue){		&lt;br /&gt;		var resp = XDocument.UI.Confirm("Are you sure you want to delete this record?", 4);&lt;br /&gt;		if (resp != 6 ) {&lt;br /&gt;			eventObj.ReturnStatus = false;	&lt;br /&gt;		}else{&lt;br /&gt;			 XDocument.Submit();&lt;br /&gt;                         eventObj.ReturnStatus = true;			&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;} catch (e) {}&lt;br /&gt;}</description></item></channel></rss>