However could you
clarify some parts please: (I'm a bit green)
HOW DO I BUILD THE WORKSFOR RELATIONSHIP?
It's a field that matches the Organisations.ThingNumber field -- presumably
a Long Integer (see below). Make sure it is set to Required=No and
DefaultValue=Null (access does not default to this, so you have to do it
yourself). Then use the Relationships window, add the two tables, and drag
the Organisations.ThingNumber field over to the People.WorksFor field (or
vice versa) and answer the following questions.
AS ABOVE FOR PRINCIPALREP
As above.
HOW DO I BUILD THESE RELATIONSHIPS?
If ThingNumber is an autonumber, then the corresponding
Organisations.ThingNumber and People.ThingNumber fields need to be Long
Integer, because autonumber is a special kind of long. You can add all
three tables to the Relationships window and drag Things.ThingNumber onto
Organisations.ThingNumber (this time the direction does matter!) and create
the 1:1 relationship. Ditto for the People table.
for this db there only needs to be a switchboard # and
fax # for organisations, and mobile, home and alt/fax for
individuals
I would probably go for a proper 1:many for all of them, for the sake of
simplicity. Your UI can try to limit the appearance of a Home phone for an
Organisation, since it is probably not a fatal error. Make it refer to the
Things table not the subtype tables, though.
Phones(*NumberAsTextField (long enough to handle the area code etc),
ThingNumber(fk references Things), TypeCode (mob, fax, hom, etc))
Also the individuals and organisations fall into common
categories (such as supplier, meeting attendee, etc.). Do
I build a Category table with a fk to individuals and a
fk to organisations - will that work?
BelongsTo(*CategoryCode (text), *ThingNumber(fk references Things))
If you need very close control over the categories, you need another table
of the categories themselves vis
Categories(*CategoryCode, Description, etc.)
and then make BelongsTo.CategoryCode a fk that references the new table.
This now makes a standard many:many relationship.
<g> You thought you could do this all with one table didn't you? Welcome to
the wonderful world of relational design! This I think is the overall state
of play:
Organisations --------+- Things -+---+----< Phones
| | |
People ---------------+ | +----< Addresses
|
+-< BelongsTo >-- Categories
The right-hand side is pretty standard one-to-many and many-to-many stuff.
The interesting part is the relationships on the left. One-to-one
relationships are not very common, but this scenario is called subtyping
and is one of the few legitimate reasons for them.
Sorry: that is a bit long, but I hope it will explain some of the black
magic at the top.
All the best
Tim F