Subject Editable/Insertable join?
Author rsaeger.edv@t-online.de
Hi,

How can I do this:

I have 3 tables:
CUST (CUSTID /*PK*/, ...)
ADRESSEN (ADRID /*PK*/, NAME, ...)
CONTACT (CONTID /*PK*/, CUSTID /*FK ->CUST*/, ADRID /*FK->ADRESSEN,
COMMENT, ...)

One customer can have null or more contacts. Users can choice a
record from ADRESSEN and "link" it to a customer, or they can insert
new record into ADRESSEN (sure, this must be linked to the customer,
too <g>).

I have two queries in a form :
QryCust – select * from cust (choice a customer)
QryContact – select contact.*, adressen.* from contact left outer
join adressen on adressen.idadr = contact.idadr
QryCust is master of QryContact.

When I set QryContact.KeyRelation to ADRESSEN, then the CONTACT table
is not editable.
When I set QryContact.KeyRelation to CONTACT, then the ADRESSEN table
is not editable.

I know, I can write a stored procedure to manage inserts and updates
in both tables ADRESSEN and CONTACT, but the IB_Edit's on my form
stay enabled/disabled depended on QryContact.KeyRelation.

How can I do it, or, better yet, is somewhere an example on this?

Thanks
Richard