recordcount per date ? could you do that?
- From: "dokter cinta" <dokter.cinta@xxxxxxxxx>
- Date: 2 Oct 2006 19:13:34 -0700
dear all
its me again....
how are you today ????
i have some problems again
i have some records per date
and i want to count it per date
here is the data
============================
date | pc
============================
01/01/2006 | pc01
01/01/2006 | pc01
01/01/2006 | pc01
01/01/2006 | pc01
01/01/2006 | pc01
02/01/2006 | pc01
02/01/2006 | pc01
03/01/2006 | pc01
03/01/2006 | pc01
03/01/2006 | pc01
04/01/2006 | pc01
=============================
look
on 01/01/2006 there is 5 record
on 02/01/2006 there is 2 record
on 03/01/2006 there is 3 record
on 04/01/2006 there is 1 record
i only know how to show all recordcount
========================================
Set rsRoom = New Recordset
rsRoom.ActiveConnection = con
rsRoom.CursorType = adOpenStatic
rsRoom.CursorLocation = adUseClient
rsRoom.LockType = adLockOptimistic
rsRoom.Open "select * from Room"
lblcount.caption = rsroom.recordcount
========================================
the problem is what the code to count it per date?
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 ....
here is 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
'please help me the code to count it per date
==========================================
thanks
best regards
THE VB LOVERS FROM ASIA
.
- Follow-Ups:
- Re: recordcount per date ? could you do that?
- From: David Kerber
- Re: recordcount per date ? could you do that?
- From: Jeff Johnson
- Re: recordcount per date ? could you do that?
- Prev by Date: Re: Owner-Drawn Listbox w/ User Control
- Next by Date: Need help with a simple code
- Previous by thread: Owner-Drawn Listbox w/ User Control
- Next by thread: Re: recordcount per date ? could you do that?
- Index(es):
Loading