IT tutorials
 
Office
 

Microsoft Access 2010 : Enhancing the Queries That You Build - Building Queries Based on Multiple Tables - AutoLookup in Multitable Queries

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
10/16/2014 9:58:49 PM

AutoLookup in Multitable Queries

The AutoLookup feature is automatically available in Access. As you fill in key values on the “many” side of a one-to-many relationship in a multitable query, Access automatically looks up the non-key values in the parent table. Most database developers refer to this as enforced referential integrity. A foreign key must first exist on the “one” side of the query to be entered successfully on the “many” side. As you can imagine, you don’t want to be able to add to a database an order for a nonexistent customer.

For example, I have based the query in Figure 5 on the Customers and Orders tables. The fields included in the query are CustomerID from the Orders table; Company, Address, and City from the Customers table; and Order ID and Order Date from the Orders table. If you change the CustomerID field associated with an order, Access looks up the Company, Address, and City fields from the Customers table and immediately displays them in the query result.

Figure 5. Using AutoLookup in a query with multiple tables.

Notice in Figure 6 how the information for Company F is displayed in the query result. Figure 7 shows that the Company and Address fields change automatically when the Customer field is changed to Company C. Don’t be confused by the combo box used to select the customer ID. The presence of the combo box within the query is a result of Access’s Lookup feature. The customer ID associated with a particular order is actually being modified in the query. If you add a new record to the query, Access fills in the customer information as soon as you select the customer ID associated with the order.

Figure 6. A query result before another customer ID is selected.

Figure 7. The result of an autolookup after the customer ID is changed.
 
Others
 
- Microsoft Access 2010 : Enhancing the Queries That You Build - Building Queries Based on Multiple Tables - Pitfalls of Multitable Queries
- Microsoft Access 2010 : Relating the Information in Your Database - Establishing Referential Integrity
- Microsoft Project 2010 : Project on the Internet (part 5) - Integrating Project and Outlook - Routing a Project file to several recipients
- Microsoft Project 2010 : Project on the Internet (part 4) - Integrating Project and Outlook - Sending Project Information to Others
- Microsoft Project 2010 : Project on the Internet (part 3) - Integrating Project and Outlook - Importing Tasks from Outlook, Copying Tasks from an Email
- Microsoft Project 2010 : Project on the Internet (part 2) - Hyperlinking to Information - Creating a Hyperlink to a Location in the Project File
- Microsoft Project 2010 : Project on the Internet (part 1) - Hyperlinking to Information - Creating a Hyperlink to a File or Web Page
- Microsoft Word 2010 : Creating an Index (part 2) - Adding an Index to a Document - Generating an Index
- Microsoft Word 2010 : Creating an Index (part 1) - Adding an Index to a Document - Marking an Index Entry
- Microsoft Word 2010 : Creating a Table of Contents (part 2) - Adding a TOC to a Document - Inserting a Customized Table of Contents
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
programming4us programming4us
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS