<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Closing a form with rule</title><link>https://www.infopathdev.com:443/forums/thread/31508.aspx</link><pubDate>Mon, 18 Aug 2008 12:33:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31508</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31508.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=31508</wfw:commentRss><description>&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;Hi,&lt;/font&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;First add user roles as &amp;quot;User1&amp;quot; and &amp;quot;User2&amp;quot; and for &amp;quot;User1&amp;quot; you need to close the form. Use following code in the on load.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&amp;nbsp;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;if(thisXDocument.Role != &amp;quot;User2&amp;quot;)&lt;br /&gt;{&lt;br /&gt;alert(&amp;quot;Add your message here&amp;quot;);&lt;br /&gt;thisXDocument.View.Window.Close(true);&lt;br /&gt;}&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;I hope this will help you.&lt;/p&gt;</description></item><item><title>Closing a form with rule</title><link>https://www.infopathdev.com:443/forums/thread/31505.aspx</link><pubDate>Mon, 18 Aug 2008 08:36:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31505</guid><dc:creator>ErikvanD</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31505.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=31505</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have Infopath 2007 form that on opening checks the users network login with a field from a SQL database. When equal the user can complete and submit the form. So far so good.&lt;/p&gt;
&lt;p&gt;When not equal the user gets a messagebox saying he has no permission. I have defined this as a rule on one of the form field. I would like the form to close automatically after the user has clicked on &amp;quot;ok&amp;quot;&amp;nbsp;in this message box. I have searched a lot on this board and the internet but have not found a suitable solution yet.&lt;/p&gt;
&lt;p&gt;Anyone any idea?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Erik&lt;/p&gt;</description></item></channel></rss>