Home
Learn Access
Tutorials
Database Design
Access Tables
Access Queries
Access Forms
Access Reports
Access 2010
History of Access
Access Articles
Access Specifications
Require a Database?
About Ben Beitler
Other Links Downloads
Contact Us
Search
Access Blog
Privacy Policy
Terms of Use

[?] Subscribe To This Site

XML RSS
Add to Google
Add to My Yahoo!
Add to My MSN
Subscribe with Bloglines

"Applying the AutoLookup Query will populate data from one related location to another. Simple to use and no coding required..."

The AutoLookup query works with related tables typically as a ('one' to 'many' relationship) and is the basis for data entry normally via a Form

There is no actual data being stored anywhere just a simple way to fill in data automatically requiring no coding at all and reduce the overall typing time.

In my example below, I want to enter a new order and since the rule is that I must first choose an existing customer before placing the order, all I need to do is choose the 'Customer ID' and get the system to look up and populate the customer details automatically.

The first step is to produce the query and then for completeness, I'm going to build a Form based on the query using the Form wizard feature.


Creating the AutoLookup Query requires two related tables in a 'one' to 'many' relationship and all the fields you want your final Form to be based on.

If you need a reminder of how to create a query, here's a link to how to create a select query which explains all the components and options that you will need to be aware of.

Step 1: Open the Database Window (version 2003 or earlier) or Navigation Pane (Access 2007 and later versions).

Start a new blank query in 'Design View' mode and select the two tables and the associated fields required.

Make sure that the joining field is correctly set for the AutoLookup query to work properly.

So for example, the common field in my example is 'Customer ID' where it is unique (the 'one' side) from a table called 'Customers' and the duplicate value of 'Customer ID' field (the 'many' side) which is from the 'Orders' table - that I choose the 'many' side related field and not the 'one' side.

Quickly run the query to check the data.

Note: When using multiple tables/queries, make sure they have a relational join between them with no 'stand-alone' files present.

AutoLookup Design

Step 2: In 'Datasheet View' mode, you can test out the response of the auto-lookup by adding a new record here.

As soon as you type a known 'Customer ID' value for an existing account and press the ENTER key, the rest of the customer's profile is filled in for you.

When you are satisfied this is working, close and save the query.

Optional Step: Create a Form using the form wizard feature based on your new query and test it out again.

AutoLookup Form

Close and save the changes.

That's it - job done!



Return from AutoLookup Query to Access Queries
Return from AutoLookup Query to About Access Databases homepage


Search this site

FREE Sign Up Tips

* Email
Firstname
Surname
* Required Field

My Recommended Links

Access Books & DVD's

Access Database Tutorial Blog

Learning SEO Optimization | Finding Keyword Phrases

Free MS Excel VBA Guide

More Resources

I have other resource websites and social networking sites for you to browse...

Blog, articles, video tutorials
Access Database Tutorial Blog

Find me on Facebook
Access Database (Facebook)

Follow benbeitler on Twitter

Linked In - Ben Beitler

 Subscribe in a reader

Access database Website
articles and news
Access Database Search

access logo icon

My Articles...
Ben S Beitler, EzineArticles.com Diamond Author




Want to host a website?
(click on image below)