Hi Dale
still no luck
what I have in the control source now is
=DLookUp("CompName","Qu-JobSelectFrmCompAnnalisi","CompNo = " &
[Cmb-slectJob])
when I run the following query the results are correct and it is this is
what I am after.
SELECT [Qu-JobSelection].[Componet short Name] AS compName,
[Qu-JobSelection].Frame, [Qu-JobSelection].[Componet No] AS CompNo
FROM [Qu-JobSelection]
WHERE ((([Qu-JobSelection].[Componet
No])=[Forms]![Frm-Componet-Annalisis]![Cmb-slectJob]));
the form is called: Frm-Componet-Annalisis
the combo box where which the query checks against is: Cmb-slectJob
the text box where the result is going is: Text97
the control source is above but obviously wrong for what ever reason.
The query is called Qu-JobSelectFrmCompAnnalisi
I am after ether the field compName or Frame
as once I have got one even I should be able to get the other.
thanks
Jon
Dale Fye said:
Jon,
the format for the DLOOKUP is:
DLOOKUP("FieldName", "TableOrQueryName", strCriteria)
1. Are you sure you have the Fieldname entered correctly (Componet
instead
of Component?).
2. Are you sure that the query name is correct?
3. The criteria must be in a string format, so it might look like:
=DLOOKUP("Component short name", "qu-JobSelection", "Component No = " &
me.cmb-SelectJob)
HTH
Dale
--
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.
:
Hi Dale
It comes back with a #error
I have also tried the following
=DLookUp("[Componet short Name]","Qu-JobSelection",[Componet
No]=[Cmb-slectJob])
and that comes back with the #name?
but I will have to leave this now for a week as I have to do a couple
of
other things on the database now.
Thanks for the help
Jon
Jon,
If your query only returns one record, and is not bound to your form,
then
try:
=DLOOKUP("Componet short Name", "Qu-JobSelectFrmCompAnnalisi")
HTH
Dale
--
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.
:
Hi
On a form the user selects a part No in a combo box, else where on
that
form
I want to use related fields to show information.
I have made a query that filters on the combo box and the results
are
correct but when I select the new text box in input in the control
source
"=[Qu-JobSelectFrmCompAnnalisi]![Componet short Name]"
all I get displayed is #Name?
What am I doing wrong to get it to display the data I want?
I am using access 97 , any advise is welcome.
Thanks
Jon