SAMPLE FOR AUTO LOOKUP QUERY

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello.
i am a teacher.i teach access 2003 in one of my class. i need a good sample
for my students for auto lookup query.
tanks.
 
Hi,


Well, not a very good one, but a simple one.

In Northwind, open the query "Alphabetical List of Products" in design, add,
in the grid, the field Description from table categories.

Observe that Products is in many to one with Categories through the common
field name CategoryID.


Switch into data view, add a record ( >* button) , specify a category
in the fourth field (that corresponds to a lookup for CategoryID for
Products), specify "Dairy Products". The before last field is then
automatically filled with the same category (which is understandable, given
the join) BUT the illustration of the AutoLookup Jet feature is to observe
than the Description field, that matches CategoryID (in Products) is ALSO
properly filled with the data (since the relation between the tables is many
to one, the table on the many side getting a value, the table on the
one-side is then uniquely determinable AND determined by Jet, automatically:
that is the autolookup feature from Jet.)


That is not a really GREAT example. A greater example would be to specify
the clientID to automatically get its name, address, etc.


Don't forget to undo the modification you did to the query, removing the
"Description" field, if you wish to keep the database "as shipped" within
Access.

Hoping it may help,
Vanderghast, Access MVP
 
Back
Top