resumes123
MIS
I am using VB 6. I am fetching values from an MS Access table called SALES. from Sales.mdb It has daily Sales values of the company. It has Sales value for each hour for every day. Hence for each day there might be several records.
The fields in the table are DATE, TIME, SALE_COST
I need to find the last row for each day and print the values on an Excel sheet.
The Date, Time, Sale_Cost at the last value of each day have to be displayed
All dates need not end at exactly the same date. Different dates have different number of rows.
I am currently working on a Code already written by another person. The entire table contents are taken in a single recordset.
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = OpenDatabase("C:\data\SALES.mdb")
Set rs = db.OpenRecordset("Select * from SALES", dbOpenDynaset)
The record set "rs" is already open and I need to work on this recordset only. I would not like to write another recordset grouping on dates.
Could some one please suggest a Visual Basic code how I can manipulate this recordset RS to get the last record for each day and print on to another Excel sheet
Thanks
The fields in the table are DATE, TIME, SALE_COST
I need to find the last row for each day and print the values on an Excel sheet.
The Date, Time, Sale_Cost at the last value of each day have to be displayed
All dates need not end at exactly the same date. Different dates have different number of rows.
I am currently working on a Code already written by another person. The entire table contents are taken in a single recordset.
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = OpenDatabase("C:\data\SALES.mdb")
Set rs = db.OpenRecordset("Select * from SALES", dbOpenDynaset)
The record set "rs" is already open and I need to work on this recordset only. I would not like to write another recordset grouping on dates.
Could some one please suggest a Visual Basic code how I can manipulate this recordset RS to get the last record for each day and print on to another Excel sheet
Thanks