ACC: AutoLookup Technique to Look Up Info. Automatically 1.x/2.0Last reviewed: May 8, 1997Article ID: Q95048 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. You can create a query or form that automatically looks up information in the one-side table of a one-to-many relationship based on an entry in a many-side field. This process is sometimes called AutoLookup. You can use AutoLookup to have a query automatically look up information in other tables and display it on a form or report. You can look up information by using any one of the following three techniques:
MORE INFORMATIONUse AutoLookup when you want Microsoft Access to automatically look up information in the one-side table based on an entry in a many-side field. The AutoLookup technique works in a query or in a form. AutoLookup also works with tables that have a one-to-one relationship if you use a left outer join. For more information about what data is updatable, search for "Underlying table or query," then "When is a query updatable?" using the Microsoft Access Help menu. For example, the Categories and Products tables in the sample database NWIND.MDB have a one-to-many relationship. Each category may appear several times in the Products table. The Products table contains the Category ID field, which is the foreign key that identifies the category for a product. When AutoLookup updates records, Microsoft Access automatically recalculates any totals or expressions that are dependent on the updated information. Microsoft Access version 1.1 has additional online Help topics for AutoLookup issues. In this context, the term "AutoLookup" is synonymous with the term "dynamic lookup." For more information, search for "dynamic lookup", then "Displaying Fields from Another Table or Query (Common Question)" using the Help menu. In Microsoft Access version 2.0, search for "AutoLookup." The following two examples demonstrate how AutoLookup works:
Example 1: Create a Query That Uses AutoLookup
Example 2: Create a Form That Uses AutoLookup
REFERENCESMicrosoft Access "User's Guide," version 1.0, Chapter 10, "Creating Forms Based on More than One Table," page 282 Microsoft Access "User's Guide", version 2.0, Chapter 11, "Designing Select Queries"
|
Additional query words: how to
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |