table relationships
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » Table relationships

Table relationships

resolvedResolved · Low Priority · Version 2007

replyReply Wed 23 Apr 2008, 16:17Delegate Candy said...

Candy has attended:
Access Introduction course

Table relationships

How do you create a relationship between tables

For upcoming training course dates see: Pricing & availability

replyReply Wed 7 May 2008, 14:14 Edited on Wed 7 May 2008, 14:16Trainer Pete said...

RE: Table relationships

Hello Candy, Thank you for your post, in answer to your question:
Once you've set up multiple tables in your Microsoft Access database, you need a way of telling Access how to bring that information back together again. The first step in this process is to define relationships between your tables. After you've done that, you can create queries, forms, and reports to display information from several tables at once.

A relationship works by matching data in key fields - usually a field with the same name in both tables. In most cases, these matching fields are the primary key from one table, which provides a unique identifier for each record, and a foreign key in the other table. For example, teachers can be associated with the students they're responsible for by creating a relationship between the teacher's table and the student's table using the TeacherID fields.

Having met the criteria above, follow these steps for creating relationships between tables.
1. In the database window view, at the top, click on Tools ---> Relationships
2. Select the Tables you want to link together, by clicking on them and selecting the Add Button
3. Drag the primary key of the Parent table (Teacher in this case), and drop it into the same field in the Child table (Student in this case.)

4. Select Enforce Referential Integrity

When the Cascade Update Related Fields check box is set, changing a primary key value in the primary table automatically updates the matching value in all related records.
When the Cascade Delete Related Records check box is set, deleting a record in the primary table deletes any related records in the related table
5. Click Create and Save the Relationship
I hope that has helped, if so please click the Resolved link, best regards Pete

 

Please browse our web site to find out more about
microsoft access training and other Microsoft training courses.

Access tip:

Convert A Form Into A Report

If there is a form that you want to to save as a report:

1. Open that form in Design View
2. Select File and Save As
3. In the Save As Dialog box Select Report

The system creates a report based on the form.

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard