Lookup

S

SW

I have two tables:
Table 1 contains recipes and is made up of ingredient numbers and other
fields.
Table 2 contains the ingredient numbers and the ingredient name.

I need to run a report that pulls the ingredient name from table 2 based on
the ingredient number that is listed in table 1.

Any advice is greatly appreciated.
 
R

Rob Parker

Create a query containing both your tables. Join the IngredientNumber
fields in each table. Drag the fields from each table that you require for
your report into the query grid; base your report on the query.

HTH,

Rob
 
S

SW

Hi Rob,

This worked well, but only for the 1st ingredient number. Once I joined the
second ingredient number to the ingredient name, the query returned nothing.

Any ideas?
 
R

Rob Parker

I can think of a couple of things, but without knowing any details of you
tables and query I can't be sure of anything. Please post those details
(table fields and SQL of the query).

One possibility is that in Table 1 you have several ingredient fields (bad
database design; not normalised). If that's the case, you need to join each
ingredient field to a separate copy of Table 2 in the query (or, infinitely
better, redesign your tables).

HTH,

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top