Excell work sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi i am using VBA to retreve data from a sql 2000 database.
i then load the active worksheet with the recordset.
what i need to do is to display sorted data from the active worksheet into
another worksheet in the same workbook ie
i get dept, employee, salary, sicktime i need to sort by dept,employee and
salary with the results displaying on another sheet.
 
alvis said:
i am using VBA to retreve data from a sql 2000 database.
i then load the active worksheet with the recordset.
what i need to do is to display sorted data from the active worksheet into
another worksheet in the same workbook ie
i get dept, employee, salary, sicktime i need to sort by dept,employee and
salary with the results displaying on another sheet.

You could use the recordset's Sort property to change the order of the
recordset, issue a MoveFirst and use the same approach to copy the
data the second worksheet as you did for the first. Note your
recordset will need a client side cursor to be able to sort it.

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top