Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parent Table Primary Key Distribution to Child Tables

Status
Not open for further replies.

pvadude

Technical User
Mar 12, 2003
1
US
I am attempting to build a database to keep track of a number of businesses which a deal with on a professional basis. The PRIMARY TABLE for the database contains descriptive information about each business (name, address, phone number, fax number, web site, etc.). The CHILD TABLES contain other pertinent information associated with the business, such as points of contact, appointments, comments, follow-up contact information, etc.

The information from the PARENT TABLE is displayed in a form with command buttons that bring up subforms for the CHILD TABLES. The fields in the CHILD TABLES that links them to the PARENT TABLE are currently being manually input through the subforms. Is there a way to automatically distribute the value of the PARENT TABLE’s Primary Key to the appropriate field in the CHILD TABLE being displayed when the PARENT TABLE form is being displayed and the CHILD TABLE form is activated through a command button?

It seems to me that there is probably a function in Access 2000 or Access 2002 that it evokes this process, but I’m not sure how to utilize the feature. If anyone could provide assistance with my dilemma, their help will be greatly appreciated.

Thanks,

Don
 
Yes, ACCESS does provide for this exact function. On your main form right click the SubForm control and select properties. Click the All tab and scroll to the top.

There are two properties called "Link Child Fields" and "Link Master Fields". It is here that you identify the fields in your master and child tables that are going to be linked. Just click on the ... button to the right and you will be taken to a window to assist in picking the fields.ACCESS then will update the Child Fields with the appropriate Master table fields for you.

Let me know if you need any further explaination. Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top