Adding multiple child entries under one primary key with access

D

DTran

Hello,

I didn't really know how to word this in Google, and because of such,
couldn't find an answer to my problem.

I have two tables: one is called job_listing and the other is
job_listing_details.

job_listing
Project # | Customer | Engineer

job_listing_details
ID | Project # | Order Date | Ship Date | Quantity | etc.....

Since we assign projects a unique number, the primary key in job_listing is
the "Project #" field, which is linked to the "Project #" in the details
table. ID in the details table is an autonumber. My problem is trying to
add a new record in the details table under an existing project number. I
get this:

"The changes you requested to the table were not successful because they
would create duplicate values in the index, primary key, or relationship.
Change the data in the field or fields that contain duplicate data, remove
the index, or redefine the index to permit duplicate entries and try again."

I understand it's because my project number (primary key) is already defined
and has to be unique, but when Infopath recognizes that the Project # already
exists, I want it to add a new record in the child table, without updating
the previous one under that Project #.

If this doesn't make sense, then take a look at the Northwind example
database. Under each Customer ID in the Customers table, there are multiple
Order IDs when you expand the plus. I want to know how to make Infopath 2003
add child records when the primary key already exists.

Thanks,
David
 

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