DAvg Formulla In Access Query

djwasim

Registered User.
Local time
Tomorrow, 02:00
Joined
May 29, 2009
Messages
93
i am using DAvg formula in a report field [avgrate] as.........

=DAvg("[Rate]","Main Query","[TranDate]<=[Reports]![Issue Plot/w]![Trandate] AND [Rate]>0 and [Itemdes] = '" & [Itemdes] & "'")

but when i want to sum this field in report i dont get any result

now i want to use this formula in query named [consumption query] but i dont know that which formula i use in query?

plz help me:o
 
Regarding your report question, you might try this if the TranDate field in your main query is date/time datatype:

=DAvg("[Rate]","Main Query","[TranDate]<=#" & [Reports]![Issue Plot/w]![Trandate] & "# AND [Rate]>0 and [Itemdes] = '" & [Itemdes] & "'")

As to your query question, we need to know how the consumption query is related to your Main Query or more basically what does your table structure look like. Can you explain in more detail what you are trying to do?
 
Actually i am not using the Transaction Date From "Main Query"

I am Using Transaction Date From "Issue Query"
And i am also using this formula in that Query named "issue Query"
 
It doesn't matter what query you are using the DAvg() function in since the domain aggregate functions are used to pull information from other tables/queries. If we had some more detail on your table structure (table names, field names, relationships between tables) we might be better able to help you out. Can you provide more information?
 

Users who are viewing this thread

Back
Top Bottom