subform sort

Jmmac04

Board Regular
Joined
Nov 16, 2004
Messages
185
I have a database created. I open a form which actually opens 2 subforms. In one of the form, it sorts by the first column but I need it to sort by the second comlumn (date) instead. I have sorted all the tables and querries by the date already

:rolleyes:

THANKS
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Open up your form in design mode and open up form properties.
First three properties under the Data tab are:

RecordSource
Filter
Order By

Change the Order By property to the field you wish to use.

Mike
 
Upvote 0
Thanks for the tip, but that was not successful. I am not sure if that is because it is a subform maybe?

I typed the field name in the Change the Order By area. Any other ideas? This database was "recreated" from an older one, the older one sorted that subform correctly.
 
Upvote 0
What do you actually mean by a subform? A subform is a form in it's own right.

Have you looked at the recordsource of the forms and changed the order there?
 
Upvote 0
Sometimes I've set my mainforms to manipulate the subform as it is presented --- aka manipulate the recordsource property for it. Please be more descriptive.

Do you have a form that requires you to use buttons/comboboxes (etc) on it before it displays the subform? And is the subform sorted/filtered based on the above?

If yes, most likely you need to look at the VBA behind the controls on the mainform for the code to change to sort the subform correctly.

Mike
 
Upvote 0
Sorry, I am not very good with Access and VBA. There is a switch board created, on there is an option to open a form to enter reservations. This form is really composed of two subforms. I have all the tables that the data is pulling from sorting by date. However, when one of the forms opens, it is sorting by resourceID. I need it to sort by date when opened. This database was a copy of another one which is working fine. I can't find what was changed.
Also, when the form opens, it is opening the two subforms in datasheet views....
Is there and "On open" comand that can be written to simply sort on the ScheduleDate field?
 
Upvote 0

Forum statistics

Threads
1,221,837
Messages
6,162,282
Members
451,759
Latest member
damav78

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