Question about database and check boxes - InfoPath Dev
in

InfoPath Dev

Question about database and check boxes

Last post 12-05-2007 11:42 AM by Clay Fox. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-04-2007 05:14 PM

    Question about database and check boxes

    Hello - I'm quite new to Infopath and could really use some help!  I have a form connected to an Access database.  In the database, I have a field called "jobs".  I would like to put a series of check boxes on the form where the user could check off what jobs they have completed.  However, it won't put a new row in the database for each check box selected - it just overwrites with the last one selected.  When I add the checkboxes to my form, it tells me that I have chosen to bind a non-repeating control to a repeating field or group.  I'm not exactly sure what this means, but I'm guessing it's related to my problem.  How can I get all of the checkboxes to be stored under the heading "jobs" - just in their own rows?  Thanks so much for any help that you can provide!  I'm at a loss!

  • 12-05-2007 07:27 AM In reply to

    Re: Question about database and check boxes

    Probably need a bit more informaiton on what you are trying to accomplish.

    You have a list of possible jobs in Access.

    You want the user to select a subset of these jobs.  Will that be stored in Access too or just in the form?

    I am guessing you would need a repeating group in your form or a seperate table in Access if that is where it is going.  Then the user would either insert a new row with a jobs dropdown for each one they wanted or you could build some code to create a new row but you would need a repeating node if they are going to have multiple and unlimited selections.

    Let me know more what you are tyring to accomplish and the Access tables and I can probably help more.

    You may also want to check out the Database Accelerator, it is the best if you are going to integrate InfoPath with a database. Qdabra Database Accelerator Suite Version 2.1 - Developer

    Filed under:
  • 12-05-2007 09:00 AM In reply to

    Re: Question about database and check boxes

    Thank you for your help!  Here’s some more info about what I am trying to do:

     

    I would like to have a form connected to an access database.  The form is to enter in information about what jobs have been completed by a particular employee.  The simple things like Employee Name, Date, etc I can do.  But then there is a section that lists all the possible jobs that an employee may do, such as ‘dig foundation’, ‘dig waterline’, etc.  I would like for these jobs to be displayed as checkboxes on the form, so that the employee can easily see the jobs there and just check off the ones they have completed.  All of these checkboxes would point to a field in the database called “jobs”.  When an employee checks off, say ‘dig foundation’ and ‘dig waterline’, I would like them each to be inserted into the database in separate rows under the “jobs” field.  (Ultimately my form will actually get more complex – because I also will have drop down lists and text fields linked to each of these checkboxes, but I’m taking this one slow step at a time to learn how to do this!).

     

    I’ve created a very simple database called “colors” just to test and learn off of before I go to the real thing.  There is a field called “color” in the database.  I put four checkboxes on the form – red, blue, green, yellow – bound to “color”.  I have been trying to get the form to accept my checking off multiple checkboxes – it will not let me.  I can only select one at a time.  It gives the message about adding a non-repeating control to a repeating group or field.  I tried out a repeating table, but I don’t think that will work – it will insert a new row, but always with the same data of “red” or “blue” – depending on what I set the value for that one checkbox.  I would like to stay away from using a drop down list if I can because I have a large number of selections and the list would be very long.  I thought checkboxes would be easier for the user to see all of the jobs and minimize them selecting the wrong one (the users are not computer savvy). 

     

    I guess my question is, is it possible to link multiple checkboxes on an infopath form to one field in a database and have it insert multiple rows under that one field in the db?  Or would I need to do some sort of coding to get this to work?

     

    I hope this clears up what I am trying to do.

     

    Thank you so much for your help – I’m stuck!

     

  • 12-05-2007 11:42 AM In reply to

    Re: Question about database and check boxes

    So you should have a table that will have userID or whatever and then jobID or in your sample you would need a color table with the userID and the color in it.

    You would be your main connection if you are using Access and then you would create a repeating table.  You would add your color field as a check box for times and each one is set when selected to use the appropriate color and when unselected " ".  Then you would use the insert row and then select the color, insert the next select a different, and so on. On submit it would build the table for you.

    Ultimately it sounds like your main project will be fairly complex. It will require architecting the database and the form well and in parallel. I again would recomend the Database Accelerator as it will make your development easier and your solution more powerful.  It allows you to have multiple submits and queried tables which will probably be neccessary once it gets more complex. Qdabra Database Accelerator Suite Version 2.1 - Developer

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