Hi all,
I'm a newbie when it comes to Access and are therefore running into difficulties. So hopefully this should be an easy one.
I want to use a query as a data source for one of the fields in a form. For this query to work it will need to be parameterised so that it only grabs the information relevant to the current record being viewed.
I have tried to do this, but every time I go to view a record the field with the query as a data source shows - #Name?.
This is the set up I have been trying:
Query - qryProductClient
All of the data that is needed (i.e. the contact, product and quote) is all there. The form frmProduct has a field on it named txtID.
The field using the query as the data source has the following control source entered:
Can someone please tell me what I am doing wrong?
Thanks for your time,
Cheers,
Alicia.
I'm a newbie when it comes to Access and are therefore running into difficulties. So hopefully this should be an easy one.
I want to use a query as a data source for one of the fields in a form. For this query to work it will need to be parameterised so that it only grabs the information relevant to the current record being viewed.
I have tried to do this, but every time I go to view a record the field with the query as a data source shows - #Name?.
This is the set up I have been trying:
Query - qryProductClient
Code:
SELECT c.chrCompanyName AS client
FROM tblContact AS c, tblProduct AS p, tblQuote AS q
WHERE p.lngzQuote=q.idsID
AND q.lngzClient=c.idsID
AND p.idsID=Forms!frmProduct!txtID;
All of the data that is needed (i.e. the contact, product and quote) is all there. The form frmProduct has a field on it named txtID.
The field using the query as the data source has the following control source entered:
Code:
=qryProductClient!client
Can someone please tell me what I am doing wrong?
Thanks for your time,
Cheers,
Alicia.