D
Dominic Greco via AccessMonster.com
I have an totals/aggregate query that looks at a table and returns the total
estimated structural engineering hours. I need to convert that SQL code to a
DLOOKUP in order to use the result in a computation.
Basically I have another totals/aggregate query that looks at a separate
table and returns the total actual structural engineering hours. I plan to
use DLOOKUP to get this result, and use it to find the % Difference between
the value for estimated versus actual hours.
One problem, I can use DLOOKUP with a standard query. But I have NO IDEA how
to use it with a Total (aggregate) query.
DLOOKUP (expresion, domain, [criteria])
I get about this far with it:
Dim intHours As Integer
intHours = DLookup("Mech_Hours", "tlbProjStruct", "proj_num= " & Me!
[txtProj_num] ........
My SQL for the total estimated structural hours looks like this:
SELECT Sum(tlbProjStruct.Struct_Hours) AS SumOfStruct_Hours
FROM tlbProjStruct
GROUP BY tlbProjStruct.proj_num
HAVING (((tlbProjStruct.proj_num)=[Forms]![frmReport_Division]![txtProj_num]))
;
Any help here?
estimated structural engineering hours. I need to convert that SQL code to a
DLOOKUP in order to use the result in a computation.
Basically I have another totals/aggregate query that looks at a separate
table and returns the total actual structural engineering hours. I plan to
use DLOOKUP to get this result, and use it to find the % Difference between
the value for estimated versus actual hours.
One problem, I can use DLOOKUP with a standard query. But I have NO IDEA how
to use it with a Total (aggregate) query.
DLOOKUP (expresion, domain, [criteria])
I get about this far with it:
Dim intHours As Integer
intHours = DLookup("Mech_Hours", "tlbProjStruct", "proj_num= " & Me!
[txtProj_num] ........
My SQL for the total estimated structural hours looks like this:
SELECT Sum(tlbProjStruct.Struct_Hours) AS SumOfStruct_Hours
FROM tlbProjStruct
GROUP BY tlbProjStruct.proj_num
HAVING (((tlbProjStruct.proj_num)=[Forms]![frmReport_Division]![txtProj_num]))
;
Any help here?