Hello krist11.
I'm a spanish Cvi programmer , I'm sorry but My English is very bad.
It's very easy:
1 First you add your data.
2 You can do a "Select" to the first table . In this select , you may find the MAX value of Key value of the first table. This select make a one Register with the Primary Key value of the Newly inserted record. This de value for the second table.
The select for do this is :
SELECT Max(First_Table.PrimaryKey)
FROM First_Table;
Execute this sql command and after create a function to see the record of the request of the select , is very easy , if have problems , tell me . Send a mail to f.bermejo.garapen@adegi.es , I will send a code to do it in Cvi.
Thanks
Tximis