submitting to access database

S

SpeedMonkay

I know this will sound like a newb question but I am currently teaching
myself infopath and databases.

I have a infopath form that has a connection to a database. Part of the form
is normal text boxes and date pickers. The bottom has a repeating table with
2 text boxes and a datepicker. When I submit it, it works fine except that
everything after the first item on the repeating table is just entered into
by itself with none of the top info

Like say I had Shipper, address, and dates on the top and then in the
repeater at the bottom I had items listed like apples, oranges, grapes, and
pears. When submitted the apples would have the shipper and address and
dates entered with it but the oranges, grapes and pears would be by
themselves with no address or anything

Is there a way to get all the top info to be entered into the database
multiple times with each item on the repeating table ?
 
S

Scott L. Heim [MSFT]

Hi,

If I understand correctly, then it sounds like you are trying to
"denormalize" the data in your database. Let me explain:

- Let's say you have 3 tables: Customers, Orders and Order Details
- One customer can have many Orders and one Order can have many Order
Details

The way you would want to set this up in your database is as follows:

- Customers table with CustomerID as primary key
- Orders table with OrderID as primary key and CustomerID as foreign key
back to Customers
- Order Details table with an OrderID & ProductID as a compound primary
key (this way an order can only have one instance of a product)

At any rate, what I am getting to with this is that all of the "Customer"
information is *not* repeated in the Orders table and all of the "Order"
information is *not* repeated in the Order Details table. These tables are
related simply on 1 or 2 fields.

So based on your question, it sounds like you are trying to repeat Shipper
information for each "detail" item (i.e. apples, oranges, etc.) and this is
really not what you want to do.

If you have not done so yet, take a look at the Northwind sample Access
database and how the relationships are setup - this may help in your
endeavor.

Best Regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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