Query not working - submit is good to go - InfoPath Dev
in

InfoPath Dev

Query not working - submit is good to go

Last post 09-18-2009 04:27 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-17-2009 12:53 PM

    • Desmo
    • Not Ranked
    • Joined on 09-17-2009
    • Posts 14

    Query not working - submit is good to go

     Hello everyone! I am new to Infopath but very exciting about the possibilities it can bring to my job. Here's the situation. Each day, we have two teams send updates of there stats. These stats include general numbers and text comments.About  7 number fields and 4 text fields.

    I understand I need to keep text under 250 characters and I am successfully able to make an access database where this information can be added. I have two infopath forms  that I will each team use to submit their updates. I have an access file with two tables (one for each team). Each infopath form utilizes it's corresponding database table by team (as primary connection to allow for the submit).

    Now I need a form to "pull everything together". Basically, I wanted a query form where I could use the "date" picker to pull the data from the access files. 

     First, I tried created a consolidated type of form that had all the data fields from both tables loaded onto it. It looked good until multiple records were entered into the tables because then the form started displaying all the data at once instead of by date.

     So after some reading, I now think I'm closer - I understand I need to create a "one to many relationship". In this case, I was going to create a main table to be used as the primary connection for a form. The table would only have 1 field, "the date".  This "date field" also exists in the other two team tables as well. 

    So, I created a query form that recognized relationships between the "date" fields in all 3 tables (main, team 1, team 2). I dragged the data fields in first to the form with no controls ( this form is going to be serving in more a report type capacity - so no need for controls except on the data query). I then dragged into the query area, a date picker.

     I hit submit  and blamo I get nothing : (.  I'm not sure where to go from this point. Is my thinking correct that I create one "main" table that has the primary key (the date field) and use that as a "one to many relatinship" for team 1 and team two tables? Can just the "date" field bring back all the other fields that I have in the two other tables or do I need to create relationships among those other fields as well to the date fields? I'm stumped!! I even made sure that each table uses the same format for the day (short date 00/ 00 /00)

     Any help is appreciated.  !!

     

    Desmo

     

    _ UPDATE _ 

     Okay - great news I got it working! - The problem was that I wasn't associating the other tables w/ the main table for the query function to work properly. Now that is good to go, my only problem left is how to figure out how to let users update existing fields. 

     

    For example, someone goes to the submit form and wants to "add" additional information to the existing records. i.e. they select a past date, add info and submit.. My guess is that access is preventing this b/c the primary key cannot have duplicates. Any thoughts? 


    Thanks!

  • 09-18-2009 04:27 PM In reply to

    Re: Query not working - submit is good to go

    Hi --

    I'm not sure I entirely understand what you are asking, but I think after submitting, for a database bound form, the user needs to then query to get back the record. So you'd place some fields (like the date you mention) from the query fields group on your form, let the user enter some information and click a button that queries the main data source. That returns the record, and they can edit and resubmit. If you haven't looked at these MSDN labs, I really recommend them for getting started.

    Hilary Stoupa

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.