Parent Chile link possibility? (1 Viewer)

ankrumc

Registered User.
Local time
Today, 16:32
Joined
Feb 23, 2009
Messages
42
I have a parent table (client) that I've used for a while now. Recently I've tried to link it to a child table (relationship).

1. Am I able to link them, so when I enter a new record, it shows up in both? (currently I can't go back and enforce referential integrity because my records don't match, and I don't want to go through each of them and make sure they all line up)

2. If I recreated the child table and start from scratch using referential integrity, can I have it automatically pull the Parent table info and populate the ID's (automated number)?

Thanks!
 

Len Boorman

Back in gainfull employme
Local time
Today, 22:32
Joined
Mar 23, 2000
Messages
1,930
The whole point of the relationship is that you do not have the same record in both tables.

Only the PK from the parent needs to be in the Child as the FK.

No you would not normally populate when you enter the Parent record. When you want to enter the Child record you select the Parent to which it is to be associated.

Referential Integrity ensures you only use a valid. Switch of Referential Integrity and your data has no Integrity and if I then looked at you application I would say

No Integrity....... No good

L
 

ankrumc

Registered User.
Local time
Today, 16:32
Joined
Feb 23, 2009
Messages
42
Ok, I think I get what you're saying.

So for instance, I have John Doe. He has all of his client information. I also want to start a different table that has different relationship information for the same record, that only has the PK in common.

Are you saying that I shouldn't expect that when my primary key (autonumber) adds on a new record, that it would also add that record/number to the child table?

Thanks!
 

boblarson

Smeghead
Local time
Today, 14:32
Joined
Jan 12, 2001
Messages
32,059
Are you saying that I shouldn't expect that when my primary key (autonumber) adds on a new record, that it would also add that record/number to the child table?
Access doesn't do that on its own. You need to set up an appropriate form/subform with the Master/Child links set and then when you add a new child record to a master record it will add the primary key from the master table into the child table. But it doesn't just happen if you add a record directly into a table or query for example.
 

jmlight

Registered User.
Local time
Today, 17:32
Joined
Feb 6, 2009
Messages
54
Are you saying that you need to set up the master/child links within the forms or are you saying that you need them within the tables ? I am trying to add a new record in the "child" table via a button on a form that is called from the main form, and I get an error message that states: "You can't go to the specified record"

Any suggestions?
 
Last edited:

boblarson

Smeghead
Local time
Today, 14:32
Joined
Jan 12, 2001
Messages
32,059
Are you saying that you need to set up the master/child links within the forms
Yes, within forms. You can't add a record directly in the table and have it propagate to the child table. The only way to do it is to have a form/subform setup and have the master/child links set properly.

Can you post your database (along with a description as to where to look).
 

jmlight

Registered User.
Local time
Today, 17:32
Joined
Feb 6, 2009
Messages
54
i would be happy to. can you direct me on where to go to read the directions on how to post a database?
 

jmlight

Registered User.
Local time
Today, 17:32
Joined
Feb 6, 2009
Messages
54
I'm really sorry - but in Access 2007, I don't see a "Tools" area. There's a database documenter, but when I ran that I got a report of fields/links, etc. So I don't think that's what you need.

tere's something called: "Make ACCDE" is that what you need?
...
Can you direct me where to go now?

Wait - I think I found it...it's under Manage....I'll take it from here
 

jmlight

Registered User.
Local time
Today, 17:32
Joined
Feb 6, 2009
Messages
54
I have attached the zip file.

The Tables I am using:
Clients
Assistance Requested
Assistance Types

The Forms are:
Clients of Centro Hispano Main Page
Clients of Centro Hispano and their Skills
Client Requests for Assistance (i have also failed when trying Requests for help, Assistance Requested, Help Needed, Client REquests for Help...well, you get the point - I've tried a LOT of forms to get this to work!)

BTW - since I'm new to Access and just trying to help out a local non-profit...I use a LOT of wizards (don't scoff!)
 

Attachments

  • zip ch database.zip
    205.7 KB · Views: 98

Users who are viewing this thread

Top Bottom