Hi,
I have two tables which are related in 1 to many relationship.
The first table has a primary key, and other fields, and the second table has a primary key, a foreign key (based on the primary key of the first table) and other fields.
I present the two tables in two forms which are linked by the foreign key field.
The problem is that when I have a certain value in the primary key of the first form and I want to change it, it changes the foreign key in the second form, but deletes all of the other data in that form.
Example:
first form :
primary key: a
...other values
second form:
first record:
primary key:a1
foreign key:a
...other values
second record:
primary key:a2
foreign key:a
...other values
when I want to edit in the first form the value of the primary key from "a" to "b", it updates the foreign key in the second form but resets the primary key and all the other values, so that there is only one record in the second form.
How can I update the value on the first form and update the second form and the related tables?
Hope this is clear enough.
Any help appreciated.
I have two tables which are related in 1 to many relationship.
The first table has a primary key, and other fields, and the second table has a primary key, a foreign key (based on the primary key of the first table) and other fields.
I present the two tables in two forms which are linked by the foreign key field.
The problem is that when I have a certain value in the primary key of the first form and I want to change it, it changes the foreign key in the second form, but deletes all of the other data in that form.
Example:
first form :
primary key: a
...other values
second form:
first record:
primary key:a1
foreign key:a
...other values
second record:
primary key:a2
foreign key:a
...other values
when I want to edit in the first form the value of the primary key from "a" to "b", it updates the foreign key in the second form but resets the primary key and all the other values, so that there is only one record in the second form.
How can I update the value on the first form and update the second form and the related tables?
Hope this is clear enough.
Any help appreciated.