Resort an open recordset

J

John Dumay

Hi All,

In my cose i open a recordset called "rsdata" based on a query. In the
original query the data is sorted ascending on a field "Q1Score" which is
fine for the first bit of code. I want to now utilise the same data set but
now sort on field "Q2Score". How do I resort the recordset based on this
criteria without closing it - or do I need a new query?

Your assistance is appreciated.

Regards,

John Dumay
 
J

J_Goddard via AccessMonster.com

Hi -

You don't need a new query, but you do need to re-create the recordset using
SQL:

set rsdata = db.openrecordset("Select * from MyQuery order by Q2Score")

should work fine, if you want all the fields from the query.

John
 

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

Top