Repeating Section/Database Problem

D

Dan von InfoPath

Hello!
I'm having a bit of trouble getting my form to work correctly, any help from
one of you experts would be greatly appreciated.

The form essentially looks like this:

UserID
Date
Item
Item_Info
Additional_Info

I am trying to make Item and Item_Info a repeating group. UserID and Date
is the Primary Key.
I was trying to use one entered Primary Key, and a repeating group of Item
and Item_Info, to have multiple rows entered into a database on one submit.

I'll try and clarify.
UserID: Bob
Date: 1/1/01
Item: Hat
Item_Info: Big
Item: Shoe
Item_Info: Small
Additional_Info: Bob is smart

I would like that to enter into the database:

Bob 1/1/01 Hat Big
Bob 1/1/01 Shoe Small

To complicate matters further, I would like the "Additional Info" to be
entered with the Key, in a separate table. I can probably figure that part
out on my own if someone could assist me with the first part.

I do not want to see "UserID Date" repeated on the form over and over again.

Anyone know if this is possible to do? I feel like I am so close, but just
not quite getting it. Thanks in advance for the help!
 
A

Adam Harding

Dan

Essential if you want to repeat back to a database, the database has to have
more than one table with the tables relating on a one-to-many basis. For
example

* is primary key
# is the field that links to the primary key on a one-to-many relationship
@ is the field that links to the primary key on a one-to-one basis

Table1
User ID*
Date

Table2
Item
Item Info
User ID#

Table3
Additional Info
User ID@

Hence you can have multiple items per user but only one additional comment.

Try that and it will work fine for both your requirements.

Cheers Adam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top