Hi Nanette,
If you have the child table in a subform, and the parent table in the main
form with the field linking set correctly, Access will handle this
automatically for you.
If you are inserting a record a different way, you will need to insert the
key yourself.
Hope that helps.
Damian.
> Is it possible to make a FK in a child table update when the parent table has
> a new record added. I'm looking to have the child FK updated when a Parent PK
> is increased via autonumbering?
>
> If this is possible, can you provide the code?
Nanette - 09 Nov 2006 00:38 GMT
Damian,
What is field linking?
> Hi Nanette,
>
[quoted text clipped - 14 lines]
> >
> > If this is possible, can you provide the code?
Damian S - 09 Nov 2006 01:07 GMT
The bit on your form/subform that specifies which field on your main form is
the primary key, and which field in your subform is the foreign key. Setting
these correctly will make Access handle your issue for you.
The field linking bits reside on the Data tab of the properties box of the
subform control on your main form.
Damian.
> Damian,
>
[quoted text clipped - 18 lines]
> > >
> > > If this is possible, can you provide the code?