Dear David:
At the risk of making it look like you are being mobbed...
No. Lookup fields are not necessary. Looking up data in related tables *is*,
but *not* using lookup fields. When I started with Access it took several
tries before one of the experts here actually got through to me on this...
Maybe an example might help? (Apologies if this seems simplistic...)
Suppose you have a database listing customers. They live all over the world.
Every customer address includes a city. .
tblCustomer
CustomerID
Name
City
Aha! You realize that you should have a separate table for city names! So
you create a table for cities, maybe something like this:
tblCities
CityID
CityName
So, you want to change the customer database, right?
tblCustomer
CustomerID
Name
Ci...
Hold it... you think.. shouldn't that be a lookup field? I mean, I want to
"look up" that information in the "cities" table, right?
At this point, you need to stop. Don't create a lookup field in the
"customer" table. Create a field called "CityID". Make it the "number"
datatype.
Now, close and save the new table design. Go to Tools>Relationships (or
click on the button). Add both tables to the design form. Click on the
"CityID" field in tblCustomer and drag it on top of the "CityID" field in
tblCities. A relationship window opens up. Check the enforce referential
integrity checkbox, the click on "Create". You have created the necessary
relationship.
Now... what next? Well, you *don't* use the datasheet to do data entry. The
next step is to create a form. (Use the wizard...). Then open this form in
design view. Click on the combobox button in the toolbox. Drag a combobox on
the form. The combobox wizard will run. Choose the option to look up the
values in another table. Follow the wizard.
Congrats! You have a combobox which presents a list of cities to choose
from. The combobox is bound to the CityID field in tblCustomer.
So you can "look up" the data in a related table, but you don't have a
"lookup field" in the Customer table...
HTH
Fred
P.S. BTW, thanks Klaatu for picking up my fumble earlier in the thread.
P.P.S. Of couse tblCities doesn't necessarily need a CityID field (Primary
key could be CityName)...
P.P.P.S. And, of course, one could also use a form/subform..
P.P.P.P.S. We'll be here when you try to figure out exactly how the combobox
works!
