M
Martin Hunter
Hi all,
Problem context:
I am working on an MSDE database with an Access ADP front-end. I'm
getting an error when inserting via a Subform which is bound to a VIEW
over two tables (TABLE1, TABLE2 related many-to-one (many TABLE1 to
one TABLE2)).
"Violation of PRIMARY KEY constraint 'aaaaaa<TABLE2>'. Cannot insert
duplicate into object '<TABLE2>'".
Detail:
The ADP contains a Form, which is bound to a TABLE. The Form contains
the aforementioned Subform, which is bound to the VIEW. The Form and
subform are related using the Link Master / Link Child of the subform
control. The 'UniqueTable' property of the Subform is set to TABLE1,
and 'Recordset Type' to 'Updateable Snapshot'.
Thoughts so far:
As I understand it, the UniqueTable property dictates which of the
TABLEs specified in the VIEW Access should update. As I have set the
UniqueTable property to be TABLE1, it seems curious to me as to why
Access should make any attempt to insert into TABLE2 at all. I can
only think it has something to do with the relationships specified,
though I am at a loss as to know how and why.
Any help much appreciated,
Mart.
Problem context:
I am working on an MSDE database with an Access ADP front-end. I'm
getting an error when inserting via a Subform which is bound to a VIEW
over two tables (TABLE1, TABLE2 related many-to-one (many TABLE1 to
one TABLE2)).
"Violation of PRIMARY KEY constraint 'aaaaaa<TABLE2>'. Cannot insert
duplicate into object '<TABLE2>'".
Detail:
The ADP contains a Form, which is bound to a TABLE. The Form contains
the aforementioned Subform, which is bound to the VIEW. The Form and
subform are related using the Link Master / Link Child of the subform
control. The 'UniqueTable' property of the Subform is set to TABLE1,
and 'Recordset Type' to 'Updateable Snapshot'.
Thoughts so far:
As I understand it, the UniqueTable property dictates which of the
TABLEs specified in the VIEW Access should update. As I have set the
UniqueTable property to be TABLE1, it seems curious to me as to why
Access should make any attempt to insert into TABLE2 at all. I can
only think it has something to do with the relationships specified,
though I am at a loss as to know how and why.
Any help much appreciated,
Mart.