update one table field based upon another different reference tab.

L

Lindy

Am attempting to update a field in one table to reflect data in a different
reference table. Example: I have a reference table that reflects the names
of various customers used as a lookup. In this reference table I also have a
field indicating the distance from my business. I would like to have a
field, distance, in my main data base be updated automatically when I lookup
and select a specific customer.
 
D

DL

You store the distance in your Reference tbl, you now wish to store the
distance in another tbl as well?
If I understand you correctly its bad design, youre duplicating data.
How are you using this 'lookup' is it on a form or what?
 
L

Lindy

Am using the "lookup" to enter the name. Rather than type the name in the
field with each new entry in the working file, I select it from the
reference file, which is available in the working file, and it is entered in
the working table. I have added distance to the reference and as I add the
name to the working table I would like it to also add the distance which is
constant with the name. This distance field will then be used later in a
query using the working table as a base.
 
J

John Vinson

Am using the "lookup" to enter the name. Rather than type the name in the
field with each new entry in the working file, I select it from the
reference file, which is available in the working file, and it is entered in
the working table. I have added distance to the reference and as I add the
name to the working table I would like it to also add the distance which is
constant with the name. This distance field will then be used later in a
query using the working table as a base.

You do not need to store the distance in the working table in order to
accomplish this! In fact you shouldn't; instead, simply join the
lookup table to your working table in the query.

John W. Vinson[MVP]
 
Top