Criteria based on another table

  • Thread starter Thread starter Liz Taylor
  • Start date Start date
L

Liz Taylor

Hi,

I have a query in which I wish to add a criteria which finds records
matching values in a field located in a different table.

I tried adding the criteria using the builder;
[tblProductClass]![ProductClass], which in turned created the following sql
statement:

SELECT tblCustomerInvoiceData.Customer, tblCustomerInvoiceData.Sales,
tblCustomerInvoiceData.Date
FROM tblCustomerInvoiceData
WHERE
(((tblCustomerInvoiceData.ProductClass)=[tblProductClass]![ProductClass]))
GROUP BY tblCustomerInvoiceData.Customer, tblCustomerInvoiceData.Sales,
tblCustomerInvoiceData.Date;

When I try to run the query a "Enter Parameter Value" window will pop up.

What am I doing wrong?

Thanks!!

Liz
 
Back
Top