<?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>Microsoft Access</title><link>https://www.infopathdev.com:443/forums/141.aspx</link><description>Qdabra is committed to answering InfoPath questions. However, we do not support Microsoft Access. For non-Access questions, please use the other boards.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Submit Button Doesn't Work</title><link>https://www.infopathdev.com:443/forums/thread/64519.aspx</link><pubDate>Thu, 24 Feb 2011 05:01:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64519</guid><dc:creator>nkstrou</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64519.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=141&amp;PostID=64519</wfw:commentRss><description>&lt;p&gt;I have an InfoPath 2007 form connected to an Access 2007 database, and yes, I started the IP template by telling it I wanted to connect to the Access DB.&lt;/p&gt;
&lt;p&gt;My Form has 3 pages: a query page where the user can see if their record exists or start a new record, and 2 pages for filling out the actual form.&lt;/p&gt;
&lt;p&gt;I set up the query form by doing a variation on the instructions at this page here:&amp;nbsp; &lt;a href="http://www.infopathdev.com/blogs/matt/archive/2006/01/09/Create-a-Multi_2D00_View-Master_2F00_Detail-using-an-InfoPath-Data-Filter.aspx"&gt;http://www.infopathdev.com/blogs/matt/archive/2006/01/09/Create-a-Multi_2D00_View-Master_2F00_Detail-using-an-InfoPath-Data-Filter.aspx&lt;/a&gt;&amp;nbsp;, I just had to apply the filters showing only the selected record on the 2nd page.&lt;/p&gt;
&lt;p&gt;So I have 3 buttons on the Query page:&amp;nbsp; Run Query (which returns all records), then in the query results table, a View Form button (which appears&amp;nbsp;only&amp;nbsp;each&amp;nbsp;existing record), then a Submit button.&amp;nbsp; The query results return in a repeating table, so user clicks the Insert link on the repeating table and it gives them a new data line.&amp;nbsp; My Submit button is visible only&amp;nbsp;for that line.&amp;nbsp; The View Form button sets the ViewID to 2 and moves to page 2 of the form.&amp;nbsp; Oh and it sets a non DB value called FormID to the PK for the record in question&amp;nbsp;from tblSupportGroups.&amp;nbsp; This idea&amp;nbsp;comes from the instructions on the link above and makes it so that I only see one record at the time. For a new record on this page, I only require 2 pieces of data, a Contact Name and a Support Group Name, which submits to my main data connection, the tblSupportGroups via the Submit button.&amp;nbsp; There are a whole ton of other fields in this table, but I should be able to submit a record with just two fields as long as there are no other required fields in the table, right?&lt;/p&gt;
&lt;p&gt;Each record also has an entry&amp;nbsp;called ViewID, which I use&amp;nbsp;so I&amp;nbsp;don&amp;#39;t get validation errors when I&amp;#39;m on a different page than the one the control is on.&amp;nbsp; That can be set to 1, 2, or 3,&amp;nbsp;according to which of my 3 pages I&amp;#39;m on, and for&amp;nbsp;right now, I show that on all 3 pages so I can make sure that validation should work.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The problem I&amp;#39;m having is that when I click Insert Record on the repeating table on the Query page, then type in&amp;nbsp;a Contact Name and Support Group Name and click Submit, nothing happens.&amp;nbsp; No errors, and no data submitted to the table&lt;/p&gt;
&lt;p&gt;Rules on the Submit Button are as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Submit the record using the main data connection&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Set ViewID to 2&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Set a field in tblSupportGroups called SubmittedQ to -1 (True) - means the record has been submitted&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Set FormID to PK&amp;nbsp;for this record in&amp;nbsp;tblSupportGroups&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Switch to the View for Page 2 of the form.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;When I click Submit, nothing happens - no errors return and no data gets submitted to tblSupport groups.&amp;nbsp; For that matter, the form doesn&amp;#39;t even advance to page 2.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Because no record is being submitted, no PK is being created in my Support Groups table, so the Form ID doesn&amp;#39;t update correctly, and if it moved to the next page, I&amp;#39;d expect it to either show the wrong record or else show all records.&amp;nbsp; If I&amp;nbsp;try the built-in Submit button, it says &amp;quot;The form does not contain any new data to submit to the data source.&amp;quot;&amp;nbsp; What???!!!???&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been through all the fields on tblSupportGroups and set all of them to not required.&amp;nbsp; I figure I&amp;#39;ll let the form validation figure out the required fields.&amp;nbsp; I also make it a point to completely shut down Access before I try to submit to make sure there&amp;#39;s not some weird sharing violation.&amp;nbsp; And I&amp;#39;m completely out of ideas.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Anyone have any thoughts?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;nkstrou&lt;/p&gt;</description></item></channel></rss>