98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access Training and help » Queries
Queries
Resolved · Low Priority · Version 2003
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
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Modal formsIf you have created a form / switchboard and dont want people to get away from using the switchboard, you can change the form properites for Modal to On. |