D
Dan
I have three tables: Customers, Products and CustomerProducts. For
simplicity, the Customers table has two fields: CustID and CustName. The
Products table has three fields: ProdID, ProdName and ProdPrice. The
CustomerProducts table has three fields: CustID, ProdID and CustProdPrice. In
this last table, the CustID and ProdID are the primary key.
For a given CustID and ProdID, I want to retrieve the CustProdPrice field
from the CustomerProducts table if a record exists for this CustID/ProdID
pair. Otherwise, I want to retrieve the ProdPrice field from the Products
table.
Can this be done with a query? Or do I have to do it with VB code?
Thanks for your help!
simplicity, the Customers table has two fields: CustID and CustName. The
Products table has three fields: ProdID, ProdName and ProdPrice. The
CustomerProducts table has three fields: CustID, ProdID and CustProdPrice. In
this last table, the CustID and ProdID are the primary key.
For a given CustID and ProdID, I want to retrieve the CustProdPrice field
from the CustomerProducts table if a record exists for this CustID/ProdID
pair. Otherwise, I want to retrieve the ProdPrice field from the Products
table.
Can this be done with a query? Or do I have to do it with VB code?
Thanks for your help!