[AccessD] A2K: Can't Get DCount to work

Darren DICK d.dick at uws.edu.au
Wed May 12 01:26:53 CDT 2004


Hi Stuart
No Joy
But the good news is Stephen Bond gave me an example off list and it works well
Many thanks for the response

Darren



----- Original Message ----- 
From: "Stuart McLachlan" <stuart at lexacorp.com.pg>
To: "Access Developers discussion and problemsolving" <accessd at databaseadvisors.com>
Sent: Wednesday, May 12, 2004 4:15 PM
Subject: Re: [AccessD] A2K: Can't Get DCount to work


> On 12 May 2004 at 13:56, Darren DICK wrote:
> 
> > Hello all
> > Can anyone tell me what I am doing wrong here?
> > I am trying to use dcount to determine how many occurrence of a particular date appear in a table
> > In my test table there are 8 records with the date 11/05/2004 
> > So... In my code below,  Msgbox intX should show 8 but it keeps showing 0 (Zero)
> > 
> > Dim intX As integer
> > intX = DCount("[OffenceDate]", "tblOffences", "[OffenceDate] = " & Me!txtOffenceDate)
> > MsgBox intX
> > 
> 
> Try 
> intX = DCount("[OffenceDate]", "tblOffences", "[OffenceDate] = " & 
> Datevalue(Me!txtOffenceDate))
>  
> -- 
> Lexacorp Ltd
> http://www.lexacorp.com.pg
> Information Technology Consultancy, Software Development,System Support.
> 
> 
> 
> -- 
> _______________________________________________
> 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