A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Tables won't link correctly



 
 
Thread Tools Display Modes
  #1  
Old February 28th, 2007, 04:55 AM posted to microsoft.public.access.tablesdbdesign
eatc7402 via AccessMonster.com
external usenet poster
 
Posts: 14
Default Tables won't link correctly

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

  #2  
Old February 28th, 2007, 05:41 AM posted to microsoft.public.access.tablesdbdesign
tina
external usenet poster
 
Posts: 1,997
Default Tables won't link correctly

the Linked Tables Manager in Database Utilities refers to tables/data in
another file (database, text file, spreadsheet 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@uwe...
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



  #3  
Old February 28th, 2007, 06:08 AM posted to microsoft.public.access.tablesdbdesign
eatc7402 via AccessMonster.com
external usenet poster
 
Posts: 14
Default Tables won't link correctly

I have a form created to enter data. A main form, connected to
the primary table, and a subform embedded in the main form.
The subform in connected to the subtable.

I've poked around but can't seem to locate the LinkChildFields and
LinkMasterFields you mentioned. It seems that thius may very
well pertain to my problem. Where do I find these fields to
check on??

eatc7402

tina wrote:

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.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200702/1

  #4  
Old February 28th, 2007, 07:38 AM posted to microsoft.public.access.tablesdbdesign
Damian S
external usenet poster
 
Posts: 741
Default Tables won't link correctly

Hi,

They are in the properties for your subform control (ie: the surrounding
control that houses your subform, located on your main form).

Hope this helps.

Damian.

"eatc7402 via AccessMonster.com" wrote:

I have a form created to enter data. A main form, connected to
the primary table, and a subform embedded in the main form.
The subform in connected to the subtable.

I've poked around but can't seem to locate the LinkChildFields and
LinkMasterFields you mentioned. It seems that thius may very
well pertain to my problem. Where do I find these fields to
check on??

eatc7402

tina wrote:

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.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200702/1


  #5  
Old February 28th, 2007, 07:02 PM posted to microsoft.public.access.tablesdbdesign
eatc7402 via AccessMonster.com
external usenet poster
 
Posts: 14
Default Tables won't link correctly

Hi,

Found them now. Setting them appears to have only patialy worked.
Now the three hundred or so records I entered BEFORE this problem showed up
appear with all there link values showing correctly.

But now when I attempt to enter a NEW record I get a long error message like..

"The object does not contain the Automation object 'my_object'".

Hummmm. I don't understand this one at all. I did not create any
procedures or VBA stuff I am aware of if this is what the message refers to.

Where do I go from here.

This whole thing WAS working before I screwed something up, but I now lost
in the forest.

eatc7402

Damian S wrote:
Hi,

They are in the properties for your subform control (ie: the surrounding
control that houses your subform, located on your main form).

Hope this helps.

Damian.


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

  #6  
Old February 28th, 2007, 07:59 PM posted to microsoft.public.access.tablesdbdesign
eatc7402 via AccessMonster.com
external usenet poster
 
Posts: 14
Default Tables won't link correctly

More info....

When I attempt to enter new data into the subform of the main form
that is when I receive this 'Automation 'error'. If I run the subform
standalone (NOT embedded into the main form) I do not receive the
'automation' error. If that helps any??

eatc7402

eatc7402 wrote:
Hi,

Found them now. Setting them appears to have only patialy worked.
Now the three hundred or so records I entered BEFORE this problem showed up
appear with all there link values showing correctly.

But now when I attempt to enter a NEW record I get a long error message like..

"The object does not contain the Automation object 'my_object'".

Hummmm. I don't understand this one at all. I did not create any
procedures or VBA stuff I am aware of if this is what the message refers to.

Where do I go from here.

This whole thing WAS working before I screwed something up, but I now lost
in the forest.

eatc7402

Hi,

[quoted text clipped - 4 lines]

Damian.


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

  #7  
Old February 28th, 2007, 09:38 PM posted to microsoft.public.access.tablesdbdesign
eatc7402 via AccessMonster.com
external usenet poster
 
Posts: 14
Default Tables won't link correctly

Well, I started from scratch and made a whole new form, linking all three
tables, their keys and data.
The new form works fine and no errors. What was wrong with the old form? I
don't know.
I did something strange, and screwed it up.

Makes a good point for backups of working db's BEFORE you begin fooling with
a previously
working db and find yourself up the creek!

eatc7402

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

  #8  
Old March 2nd, 2007, 04:03 AM posted to microsoft.public.access.tablesdbdesign
tina
external usenet poster
 
Posts: 1,997
Default Tables won't link correctly

sorry i didn't get back to you yesterday, eatc, but you did just fine on
your own - good job! and you're learned a fair bit about main/subforms,
which gives you a good boost up - subforms are very useful in Access user
interfaces, so it pays to know how to use them effectively.


"eatc7402 via AccessMonster.com" u31512@uwe wrote in message
news:6e7faeab53d84@uwe...
Well, I started from scratch and made a whole new form, linking all three
tables, their keys and data.
The new form works fine and no errors. What was wrong with the old form? I
don't know.
I did something strange, and screwed it up.

Makes a good point for backups of working db's BEFORE you begin fooling

with
a previously
working db and find yourself up the creek!

eatc7402

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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:52 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.