Display data from another table on a subform

C

Carolyn

Hi,

It's been a really long time since I was in school, and I'm having some
trouble with the database I'm working on.
I have an Orders table and an Order Details table. Both of these are on a
form, with the Order Details being the subform.
I have the user choose the ProductID (Order Details), and then I would like
Access to automatically show the associated ProductDescription (which is
listed in the Products table).

Please help if you can... I'm not sure how to set this up.
 
D

Douglas J Steele

Create a query that joins your Order Details table to your Products table,
joining them on ProductID.
 
C

Carolyn

Hi Doug,

Thanks for the advice. I've joined the tables, and put in a textbox on the
subform to display the description, but it shows "#Name?".
What should I be putting into the Control Source for this textbox?

--
Thanks again,
Carolyn


Douglas J Steele said:
Create a query that joins your Order Details table to your Products table,
joining them on ProductID.
 
D

Douglas J Steele

What exactly did you do? Did you create a query that joins the two tables,
and that query is now the recordset for your form? If so, when you run the
query by itself, do you get the correct value?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Carolyn said:
Hi Doug,

Thanks for the advice. I've joined the tables, and put in a textbox on the
subform to display the description, but it shows "#Name?".
What should I be putting into the Control Source for this textbox?
 
C

Carolyn

I joined the two tables, and when I run the query by itself it does display
the description associated with the ProductID. Do I need to create a new
field in my OrderDetails table?
 
D

Douglas J Steele

Are you using the query that joins the two tables as the recordsource for
your form, or are you still only using the Order Details table?
 
Top