DLookup between two quries (1 Viewer)

AlefAelol

Registered User.
Local time
Today, 21:32
Joined
May 21, 2014
Messages
75
I have a query named "qryStudentMarkTable" which include student marks and some calculation fields. Another GroupBy query "qryStudentYearResults" which includes some functions to find students final result and averages. In the second query there is a calculated field named "ResFCourse" which is calculated by public function. Now, I want to Dlookup "ResFCourse" to a first query filed named "Res1". I tried many scenarios of using Dlookupwith but no avails I use:


Code:
Res1: DLookUp("[qryStudentYearResults]![ResFCourse]","[qryStudentYearResults]","[qryStudentYearResults]![StudentYearLevelID]=" & [StudentYearLevelID])
However, my code stuck with the following error



 

Attachments

  • Capture1.JPG
    Capture1.JPG
    21.9 KB · Views: 79

Gasman

Enthusiastic Amateur
Local time
Today, 19:32
Joined
Sep 21, 2011
Messages
14,264
The recommended method is to join the queries with the field you are using as criteria for the dlookup.?

Saying that, qualify the criteria, you've qualified everything but that. :)
I do not believe you need to qualify for the dlookup field you are returning as that is done by the second parameter of the dlookup.
 

AlefAelol

Registered User.
Local time
Today, 21:32
Joined
May 21, 2014
Messages
75
The recommended method is to join the queries with the field you are using as criteria for the dlookup.?

Saying that, qualify the criteria, you've qualified everything but that. :)
I do not believe you need to qualify for the dlookup field you are returning as that is done by the second parameter of the dlookup.
Ah! my poor idea, was that easy. !! So no need for DlookUp and no more headache . Many Thanks
 

Users who are viewing this thread

Top Bottom