Re: recordcount per date ? could you do that?



select "date", count(*) as I group by "date" from myTable ?????

so if i choose the date between 01/01/2006 until 18/01/2006
i will know how much recordcount per date on 01/01/2006 , 02/01/2006,
03/01/2006, and more... ???

so where is on the sql statement to tell the informations of the
recordcount per date
look my code

start1 = DTPicker1.Value
start2 = DTPicker2.Value
strsql = "select * from room where date between #" & Format(start1,
"MM/dd/yyyy") & "# AND #" & Format(start2, "MM/dd/yyyy") & " #"

Set rsRoom = New Recordset
rsRoom.ActiveConnection = con
rsRoom.CursorType = adOpenStatic
rsRoom.CursorLocation = adUseClient
rsRoom.LockType = adLockOptimistic
rsRoom.Open strsql

lblcount.caption = rsroom.recordcount '<== the informations to show the
recordcount

but i dont know how to recordcount per date.
i want to know how much records per date
thanks...
please help me .......................



best regards



THE VB LOVERS FROM ASIA



Jeff Johnson wrote:
"David Kerber" <ns_dkerber@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:MPG.1f8c14a3e7a91af5989a1e@xxxxxxxxxxxxxxxxxxxxxx

select "date", count(*) as I group by "date" from myTable

Flip the GROUP BY and FROM clauses....

.



Relevant Pages

  • Re: Easier / different way to do this
    ... It is bad practice to rely on the recordcount property. ... WHERE SomeCriteria ... >I now use a DAO connection SQL statement, ... > built in features of Access when I revert to using VBA. ...
    (comp.databases.ms-access)
  • Re: Recordcount / Variable
    ... the SQL statement is not that complex, as already supplied, it is a simple ... A variable I am using to ReDim an Array is not getting the number I ... rememeber that the recordcount property will show ... If you're using ADO, then my view is that the ADO recordcount is not ...
    (microsoft.public.access.formscoding)
  • Re: recordcount per date ? could you do that?
    ... recordcount per date ... And how does this IN ANY WAY look like the SQL statement you were given? ... RoomCount. ... else you'll just get the first room count in the list. ...
    (microsoft.public.vb.general.discussion)