Re: Tables won't link correctly



the Linked Tables Manager in Database Utilities refers to tables/data in
another file (database, text file, spread*** file, etc) that are "linked"
to your database. that has nothing to do with the relational links between
native tables in your database.

The primary table works correctly and autogenerates a new number in the
link
field each time a new record is added.

However the link numbers are NOT being carried over to the
subtable. The subtables link field remain blank.

okay. how and when are you expecting the "link numbers" (foreign key values)
to be assigned to the subtable (child table)? it will not happen
automatically if you're entering data directly into the child table. it will
not happen at all when you enter records into the parent table - that has no
effect on the child table. the standard way to enter parent records and
related child records is to create a main form bound to the parent table,
and a subform (within the main form) bound to the child table. check the
LinkChildFields and LinkMasterFields properties in the subform control
(within the main form) to be sure they are set to the child table's foreign
key fieldname, and the parent table's primary key fieldname, respectively.
when you enter a parent record, and then move to the subform and enter a
child record, the foreign key field in the child record will automatically
populate with the primary key value from the parent record.

hth


"eatc7402 via AccessMonster.com" <u31512@uwe> wrote in message
news:6e76ed0fb34f0@xxxxxx
I am using Access 2002. I have two tables. The primary table has an
autonumber field which is set to increment. The field is a long
integer.This
field is set as the primary key. The second subtable has
has a number field, set to long integer. Both the primary table
field, and the subtable field are named exactly the same.

Both table are shown on the Relationships screen and have a
one to many join line between them.

The primary table works correctly and autogenerates a new number in the
link
field each time a new record is added.

However the link numbers are NOT being carried over to the
subtable. The subtables link field remain blank.

When I am displaying the Relationship window, and I select
Datebase Utilities/Linked Tanle Manager I get a message
the says "there are no linked tables in you database",
even though there are join lines between the table.

Well.. something is wrong, I've been trying to fix it for
several days, but I am afraid I'm lost in 'the forest or
the trees' syndrome.

I must be missing something, but I can't seem to figure it out.

eatc7402

--
Message posted via http://www.accessmonster.com



.


Loading