Link to home
Start Free TrialLog in
Avatar of s_khan
s_khanFlag for United States of America

asked on

Add records to Many-To-Many linked table

I am creating an Access 2007 solution to enter information about Inventors and Patents. One Inventor can have multiple Patents. One Patent can belong to multiple Inventors.

I have set up the many-to-many relationship using link tables.
Inventor table --> InventorID, InventorName fields
Patent table --> PatentID, PatentTitle, FilingDate field
lkInventorPatent --> InventorID, PatentID and pkInvPat(autonum) fields

I need a form for the user to enter Patent information. They need to be able to choose the Inventor(s) that go along with the Patent.

I know the new records need to go into the lkInventorPatent table. I have been trying for two days to make this happen. (This is my first Access assignment ever) I have put a subform on the Patent form with  fields from the lkInventorPtent table.  I have tried attaching VBA code to events to add records using selections from a listbox on the form. I am missing something really simple here, aren't I?

Can someone please help me with baby steps or a small example DB attachment? This assignment was supposed to take less than a week and I haven't gotten to the Reports yet.  :-O

Avatar of calpurnia
calpurnia
Flag of United Kingdom of Great Britain and Northern Ireland image

Can we have a look at what you've done so far?
ASKER CERTIFIED SOLUTION
Avatar of Sheils
Sheils
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You said above that this is your assignment, so I don't think it would be right for someone else to do too much of it for you. But if you post your existing database with the tables and forms you've created so far, I'll be happy to take a look and give you a pointer as to what's going wrong.
Avatar of s_khan

ASKER

When I spoke of an assignment, I meant I was working on it at work, not for a school assignment.  :-)

I downloaded the example file and will look at that. It looks like a good many-to-many setup.

I wish I could just post the database I had created so far. Unfortunately, it is for a client.  :-(  I just keep thinking I was missing something so simple to be able to add InventorID and PatentIDs to the link table by somehow allowing the user to choose  InventorNames from the Inventor table.

I am not certain how to do Points here. Since I still need to understand from a personal standpoint, I guess it's fair to close this out to sb9 for pointing me toward an example.

Thank you for your offers of help and to look at what I had created.
Avatar of s_khan

ASKER

Thank you for finding me a good example of a many-to-many relationship solution. I will study it.