Submit Button Doesn't Work - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Submit Button Doesn't Work

Last post 02-23-2011 09:01 PM by nkstrou. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 02-23-2011 09:01 PM

    Submit Button Doesn't Work

    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.

    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.

    I set up the query form by doing a variation on the instructions at this page here:  http://www.infopathdev.com/blogs/matt/archive/2006/01/09/Create-a-Multi_2D00_View-Master_2F00_Detail-using-an-InfoPath-Data-Filter.aspx , I just had to apply the filters showing only the selected record on the 2nd page.

    So I have 3 buttons on the Query page:  Run Query (which returns all records), then in the query results table, a View Form button (which appears only each existing record), then a Submit button.  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.  My Submit button is visible only for that line.  The View Form button sets the ViewID to 2 and moves to page 2 of the form.  Oh and it sets a non DB value called FormID to the PK for the record in question from tblSupportGroups.  This idea 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.  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?

    Each record also has an entry called ViewID, which I use so I don't get validation errors when I'm on a different page than the one the control is on.  That can be set to 1, 2, or 3, according to which of my 3 pages I'm on, and for right now, I show that on all 3 pages so I can make sure that validation should work.

     The problem I'm having is that when I click Insert Record on the repeating table on the Query page, then type in a Contact Name and Support Group Name and click Submit, nothing happens.  No errors, and no data submitted to the table

    Rules on the Submit Button are as follows:

    • Submit the record using the main data connection
    • Set ViewID to 2
    • Set a field in tblSupportGroups called SubmittedQ to -1 (True) - means the record has been submitted
    • Set FormID to PK for this record in tblSupportGroups
    • Switch to the View for Page 2 of the form.
    • When I click Submit, nothing happens - no errors return and no data gets submitted to tblSupport groups.  For that matter, the form doesn't even advance to page 2.

    Because no record is being submitted, no PK is being created in my Support Groups table, so the Form ID doesn't update correctly, and if it moved to the next page, I'd expect it to either show the wrong record or else show all records.  If I try the built-in Submit button, it says "The form does not contain any new data to submit to the data source."  What???!!!???

    I've been through all the fields on tblSupportGroups and set all of them to not required.  I figure I'll let the form validation figure out the required fields.  I also make it a point to completely shut down Access before I try to submit to make sure there's not some weird sharing violation.  And I'm completely out of ideas.

     Anyone have any thoughts?

     nkstrou

    An imprecisely defined requirement has an infinite number of possible solutions. Unfortunately, only about a maxiumum of 3 solutions are actually satisfactory to the end user.
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.