Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

Resort an open recordset

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Dumay - 25 Jan 2008 17:06 GMT
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_Goddard - 25 Jan 2008 19:20 GMT
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

>Hi All,
>
[quoted text clipped - 9 lines]
>
>John Dumay
John Dumay - 25 Jan 2008 19:28 GMT
Hi John,

Thanks for the input. Works a treat.

Regards,

John Dumay

> Hi -
>
[quoted text clipped - 20 lines]
> >
> >John Dumay
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.