Apologies for the early post before proof reading. Here is my post again,
proof read:
I have a 'supertype' table with only one field: autonumber. Call this table
the 'parent' table. There are two subtypes, 'androids' and 'martians'.
Androids and Martians have only one thing in common: they can unilaterally
birth to mules.
Each android and Martian have a primary key, which is a foreign key to the
parent table (and the parent table has only one field: autonumber). Now, I
want to insert a new record in 'android' or 'Martian.
This can be done easily using MS-Access forms. But I want to do so using
SQL. To add a Martian, I first need the parent ID. How do I know what it
is?
Here are my tables
tlbParent
Autonumber (PK)
tblAndroid
ParentFK (PK)
AndroidFields
tblMartian
ParentFK (PK)
MartianFields
tblMules
ParentFK
MuleFields
If I want to insert an Android, I need to first insert a record in parent.
How do I do that, if I don't know the autonumber value of the record?
Many thanks for your help
Ilan
"Ilan Sebba" <ilan underscore sebba at btinternet stop com
de***@yahoo.com>
wrote in message news:ne********************@lnews.actcom.co.il...
I have a 'supertype' table with only one field: autonumber. Call this
table the 'parent' table. There are two subtypes, 'androids' and 'martians'.
Martian have only one thing in common: they give birth to identical mules.
So each android and a martian have primary key which is a foreign key to
the parent table. Now, I want to insert a new record in 'android' or
'martian'. This can be done easily using MS-Access forms. But I want to do so using
SQL. To add a martian, I first need the parent ID. How do I know what it
is?
Here are my tables
tlbParent
Autonumber (PK)
tblAndroid
ParentFK (PK)
AndroidFields
tblMartian
ParentFK (PK)
MartianFields
tblMules
ParentFK
MuleFields
If I want to insert an Android, I need to first insert a record in parent.
How do I do that, if I don't know the autonumber value of the record?
Many thanks for your help
Ilan