Remove Filter and then sort by field

loopa1

Board Regular
Joined
Sep 3, 2006
Messages
156
Hi all.
Ok...I've been lazy and I've been caught out!

I copied a form to use as another albeit after 'tweaking' it. It has a search box which is used to filter the records and show them in a split form and also has a buttom to remove the filter and show all records. However, when I click this, all the records are shown but they are sorted by the field I don't want to sort by - how do I change which field to sort the split form by after clearning the filter.

Before any filter has been applied, the split form is ordered in the correct way - by ID which is a hidden field.


I'm using Access 2010 - although I've just realised I'm going to have to change these to sub-forms as my end-user will be using A2003...but that can wait until another day!

Thanks.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Ok...spotted that the original form was based on a query which had sorted on a particular field.

So I created another one for my copied form (it was based on a table and not a query) and sorted in that and now it looks fine after removing the query.

Still not sure why it would default to the 3rd field in the table before making the above change.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,833
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top