queries
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 » Queries

Queries

resolvedResolved · Low Priority · Version 2003

replyReply Fri 14 Nov 2008, 17:06Delegate Fatou said...

Fatou has attended:
Access Intermediate course

Queries

Creating relationships

For upcoming training course dates see: Pricing & availability

replyReply Mon 24 Nov 2008, 12:06Trainer Simon said...

RE: Queries

Hi Fatou,

Thank you for your question.

Do you mean how do you create relationships?

If so, if we take the example of a two table database which has a Customer table and Orders table.

Each table requires a Primary key which uniquely identifies each new Customer and each new Order. So the two primary keys would be Customer_ID and Orders_ID.

However in the Orders table you need a Foreign key to link the two tables together. So underneath the Primary key in the Orders table you need to insert a new field called Customer_ID (the name of the Primary key in the Customer table) which is your foreign key.

Make sure the Data Type for Customer_ID field in the Customer table is Autonumber and make sure that the Foreign key is set as a Number Data Type and the field size is Long Integer.

Then go to Tools and Relationships and drag the Primary key from the Customer Table on top of the foreign key in the Orders table and enforce Referential Integrity.

I hope this answers your question.

Regards

Simon

 

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

Access tip:

Change case

To change case from upper or lower case, highlight the text area, hold down the Shift key and pres F3

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