A Austin
|
Posted: 05/15/2003, 8:28 PM |
|
Hi
I have two tables connected to a main table with 1 to many relationships.
When an entry is made into the main table I want to make 2 default entries
into the sub tables. How do you do this with CCS. ie find the latest record
primary key id added (access) and use that for foreign key in 2 sub tables.
Andrew
|
|
|
Peter Haider
|
Posted: 05/16/2003, 3:20 AM |
|
Hi Austin,
"A Austin" <plant-tech@xtra.co,nz> schrieb im Newsbeitrag
news:ba1lta$4tc$1@news.codecharge.com...
> Hi
> I have two tables connected to a main table with 1 to many relationships.
> When an entry is made into the main table I want to make 2 default entries
> into the sub tables. How do you do this with CCS. ie find the latest
record
> primary key id added (access) and use that for foreign key in 2 sub
tables.
> Andrew
>
Regarding the latest record: it depends which datasystem you use.
But i have another solution for:
Change the return page property for the insert button to the current page
After Post / Submit the page, you are able to read the inserted record ->
also the prim key
in the before show page event, you can insert code to check if secondary
records exist (with the key value of the prim record) and if not, insert the
records by an sql statement
Hope, this helps
Best regards
Peter Haider
|
|
|
|