Access Relationships

I am teaching myself table relationships and I am having some problems. I feel I need a linking table between the tables I have made but have tried several ways of using the linking table with no success thus far.

I have tree tables: Deals, Organizations, Lawyers and Links.

Each organizaion is represented by one lawyer. I can't seem to make a one-to-one and keep referential integrity.
Each organization can have many different deals with other organizations with different lawyers.

In the deals table something funny is going on in that it seems to be linked to itself and it should link to Organizations.

Any help on this would be much appreciated.
AttorneyDB2.accdb
James CoatsComputer Info. Sys. StudentAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
If an Organization can be associated with multiple Deals, then you need a Join table between your Organization table and your Deal table:

tblOrganization_Deal
------------------------------
ID
OrganizationID
DealID

From there, an Organization can be associated with multiple Deals, and Deals can be associated with multiple Organizations.

I'm also curious regarding the tblDeals.fldLawyerID. Is a single Lawyer associated with a Deal? Or can there be multiples?

Also, do yourself a favor and stop setting lookups in Table Design. For example, tblOrganization.fldLawyerID is a combo. It should not be. It should be a simple Numeric field, with the "Lookup" set to "Textbox". After creating a form based on that table, if you then would like a List or Combo, create that control on the Form.

A bit more information:

A Table should define a specific "entity" in your real-world need. In your example, you have Organizations, Lawyers and Deals. Your Organization table should have attributes about an Organization ONLY - for example, you would not store the LawyerName in that table, but rather a link to the Lawyer associated with the Organization. The Lawyers table should store information about the Lawyer only - for example, Name, FirmName, DateOfBirth, etc. It would not store information about the Deal, and would not necessarily store a link to the Deal table (since, presumably, a single Lawyer could be associated with more than one Deal).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
James CoatsComputer Info. Sys. StudentAuthor Commented:
Scott,

Thank you for the suggestions. I will work a new db on them. As to your question a lawyer can only be associated with one deal.

I am just working on developing skills in linking tables. I know in real life more than one lawyer would be associated with the same deal. This just to force the issue of making a specific type of link.

If you have no other suggestions. I will start the new db and award you the points.


Sam
0
James CoatsComputer Info. Sys. StudentAuthor Commented:
Thanks Scott,

I will have to finish up tomorrow. This will be very helpful to me.

Sam
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.