Dsum using Query Field as criteria (1 Viewer)

Drand

Registered User.
Local time
Tomorrow, 10:49
Joined
Jun 8, 2019
Messages
179
Hi

I have a query that includes a number of defined calculations, such as "TotalCost: [Quantity]*[UnitCost]", and " MyYear: DatePart("yyyy",[Date1])".

I am trying to build another query based on the first, using these fields as criteria in a dsum and dcount expression.

My first question is:

Do I have to recalculate these in the second query or am I able to just reference and the name, and

Second:

If I have to recalculate these in the second query, could some please help me with the syntax?

What I am trying to achieve is Dsum( "AQuanityFiled]","FirstQueryName", "Field" = '" & [TotalCVost] & "'" and '" & [MyYear] & "'")

I hope this makes sense

Thanks
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 07:49
Joined
May 7, 2009
Messages
19,169
you do not need to recalculate it on the new query.
 

Users who are viewing this thread

Top Bottom