"John Kreps" <de***********@kreps.mailsnare.net> wrote in message
news:3f***********************@news.frii.net...
Fletcher, thanks for the reply. The tables (tblPeople and tblCompanies)
must remain unrelated unforunately for me.
Your idea on creating a field/key that would be unique to both tables is
interesting...I'm not sure how I'd implement that tho. How could I
ensure the new field contained unique data without user intervention
(i.e., an autonumber field for two "joined" tables)?
You could have PtyID as an autonumber, PtyName as text. When you add either
a new company or new person you first create an entry in tblParty and get an
ID. This ID is then put into either tblCompanies.FkPartyID or
tblPeople.FkPartyID before filling in the other fields for the selected
table.
I have used this idea in a database I did for a university where all
contacts got an entry in tblPersons, but students had an entry in
tblStudents with a matching PsnID which was also unique in the students
table. This made a certain amount of sense because although all people
share fields like FirstName, LastName, etc students had additional data not
relevant to other types of person. In other words students were modelled as
a sub-class of people (sub-class - what an appropriate prefix ;-)
Obviously, your situation is not quite the same and my gut feeling is that
there might be a better way. It's really hard to say without an overall
view of the database. Here are a few random thoughts:
Allocate all payments to people (Although I might guess, you haven't
actually stated why you wouldn't do this)
Not enforce referential integrity at table level. Let your interface and
coding take care of it.
Split the payments table into PeoplePayments and CompanyPayments and join
with a union query.
Perhaps you will get some input from others...
Fletcher