[AccessD] A2003: Distinct or Group by in a DLookup

Darren D darren at activebilling.com.au
Wed Apr 30 23:11:06 CDT 2008


Hi Stuart - never mind - thanks
 
Darren
-----------------
T: 1300 301 731

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Wednesday, 30 April 2008 4:02 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] A2003: Distinct or Group by in a DLookup

Not AFAIK.  DCount() only operates on a Table or Query.  
One way would be to create and save the  query "Select Distinct ClientID from 
tblPendingActions".   Then use DCount on that saved query.



On 30 Apr 2008 at 15:30, Darren D wrote:

> Hi Team
> 
> I have a simple DLOOKUP working well
> 
> intRecordCount = DCount("[ClientID]", "tblPendingActions")
> 
> But I want to know - Is there a "Distinct" version of the same?
> 
>  
> 
> EG
> 
> intRecordCount May return 10 records (but this may only be across say 2
> accounts)
> 
> So I want to know if there is something where I can group on the ClientID -
like
> 
> intRecordCount = DCount(Distinct("[ClientID]", "tblPendingActions"))
> 
>  
> 
> Many thanks in advance
> 
>  
> 
> Darren
> 
>  
> 
>  
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list