Find and Replace query

E

Ernest Lai

Hi all, I have a column with product codes but instead of these codes, i
would like the query to show what they actually are.

for example A01 = eggs, A02 = milk.

Is there a way to make a query look up the 3 digit code and use the actual
product? So when i export the file all the codes are replaced by actual
procduct names.

Thanks in advance

Ernest
 
D

Dennis

Can't you simply add the products table to your query design and create a
join on the product code ?
If yes, you can then simply add the product name from the product table as a
column in your query.
 
S

Steve Schapel

Ernest,

Do you have a Products table that lists all the product codes and their
associated product names? If so, you can make a query with this product
"master list" joined via the product code field to the other table you
are referring to. And then, in the query, you will be able to include
the product name.
 
T

Tom Wickerath

Hi Ernest,

Does your query currently display the product names, but when you export it
you get only the codes? If so, you are likely experiencing one of the evils
of lookup fields. See the 2nd commandment here:

http://www.mvps.org/access/tencommandments.htm

The answer to your question is likely yes, depending on your database
design, but you'll have to add the table that contains the products to your
query, and include the product name in the QBE grid from this table. This
product table is likely linked to your current table via the product code
field.

Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Hi all, I have a column with product codes but instead of these codes, i
would like the query to show what they actually are.

for example A01 = eggs, A02 = milk.

Is there a way to make a query look up the 3 digit code and use the actual
product? So when i export the file all the codes are replaced by actual
procduct names.

Thanks in advance

Ernest
 
E

Ernest Lai

You can tell it's a morning. That is so simple! Sigh i have done this table
joining thing so many times as well. Thanks everyone.

Ernest
 
Top