About AutoLookup queries that enter data automatically

About AutoLookup queries that enter data automatically

You can design a multiple-table query to automatically fill in certain field values for a new record. When you enter a value in the join field in the query or in a form, report, or data access page based on the query, Microsoft Access looks up and fills in existing information related to that value. For example, if you know the value in the join field between a Customers table and an Orders table (typically, a customer identifier such as CustomerID), you could enter the customer ID and have Microsoft Access enter the rest of the information for that customer. If no matching information is found, Microsoft Access displays an error message when the focus leaves the record.

Enter a value in a join field

Remaining data is retrieved

For AutoLookup to work, certain conditions must be met:

When the value of the join field from the "many" side of the relationship is added or changed in a record, Microsoft Access automatically finds and displays the associated values from the table on the "one" side of the relationship.

While you can always update the join field from the "many" side of a relationship, you can update the join field from the "one" side only if you enabled cascading updates when defining the relationship between the tables. Either way, when you update data, Microsoft Access automatically recalculates any totals or expressions in the query that are dependent on the updated data.