Use subform record set as domain argument in DAvg()
        Posted  
        
            by harto
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by harto
        
        
        
        Published on 2010-04-02T07:40:33Z
        Indexed on 
            2010/04/02
            7:43 UTC
        
        
        Read the original article
        Hit count: 216
        
Is it possible to use a subform's 'current' record set as the domain argument to DAvg() (etc.)?
Basically, I have a subform that displays a subset of records from a query. I would like to run DAvg() over this subset. This is how I've gotten around it:
=DAvg([FieldToAvg], [SubformQuery], "ChildField=Forms.MasterForm.MasterField And FieldToAvg > 0")
but what I actually want is something like:
=DAvg([FieldToAvg], [SubformCurrentlyDisplayedData], "FieldToAvg > 0")
Is this possible in Access 2007?
© Stack Overflow or respective owner