Teedee Access Teedee 2010
Link Tables

Relationship Editor

From the Tools menu select Relationships The Relationships window is opened and on top of it is displayed the Add Table dialog Select tblCustomers and click Add Select tblInvoices and click Add Select tblInvoicesItems and click Add Click the Close button Use the table selection bar at the top of each table to drag the tables into position Move the mouse pointer over each of the edges of the tables to make them wider/narrower and shorter/taller To link CustomerID to BillTo click CustomerID and drag it onto the BillTo field The Relationships dialog (see below) is displayed. Ensure Enforce Referential Integrity is checked. With this Referential Integrity a BillTo entry must pre-exist in the Customers table. Note that both CustomerID and BillTo are Long Integers Both Cascade check boxes should be clear Click OK to close the dialog

Introduction

We have created tables for Invoices and Invoice Items. You may have noticed that both tables had a common field InvoiceNumber. We will now use this field to link the two tables. Hopefully you will also have noticed how much the point of having the two fields the same Type was stressed. The link between two tables must have both fields the same type, text to text or Number to Number. Additionally, if the fields are both number fields they must both be the same size, Number-Integer to Number-Integer OR Number- Long to Number-Long (Long Integers are referred to as Longs by programmers) The diagram opposite shows the relationships in the finished database. (This tutorial will not cover the Payments table)
1 2 Home Tutorial Code Snippets