problem with 1:0/1 relationship in detail form (problem updatingrecord in two tables)

  • Thread starter Gerald Aichholzer
  • Start date
G

Gerald Aichholzer

Hi all,

I'm working on an ADP with Access 2003 and MSDE200A

I have some troubles and asking for help. I have to tables
having the following form (simplified):

table Contact
idContact (primary key, int identity)
contacttype
name1
name2
... (other fields, all optional)

table ContactCompany
fiContact (primary key, int)
... (some data fields, all optional)

There exists a 1:0/1 relationship between table Contact and
table ContactCompany.

I create a query (view, stored procedure or inline function):

SELECT Contact.*, ContactCompany.*
FROM Contact
LEFT OUTER JOIN ContactCompany
WHERE Contact.idContact = ContactCompany.fiContact


Then I create a form based on this query, but I can't add/change
data in ContactCompany's fields unless it already has an entry
in this table.

I get a write conflict error when I move to another record:
This record has been changed by another user since you started
editing it...

In MDB database this works just fine with no additional code
needed. What can I do to make this happen?


thanks,
Gerald
 
G

Gerald Aichholzer

I think you can't modify the result/contents of a select query/sp.

Well,

it works now - the solution was to include a timestamp-column
in both tables, but these columns have to be excluded from the
view which the form is based on.

Gerald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top