Filter/Sort Not Availble

Local time
Today, 03:44
Joined
Feb 25, 2008
Messages
410
I have a form that is set to Single Form. It has a subform.
The form has navigation buttons on the bottom and it allows me to 'browse' through all the records.

I have the filter/sort buttons on my menu bar, but they are greyed out.
Even when I right-click on a field to filter by selection or something, the filter/sort options do not enable.

The form's open event has an openargs statement that uses docmd.findrecord. I thought that might be the cause, but even when I comment out that code, or open the form without any openargs, I still can't get the sort/filter options to enable..

Does anybody have an idea of what I might be doing wrong?

Correction: The sort-Asc & sort-Desc options are enabled but not the filter options
Also, I just noticed something that may be of importance:
The 'Remove Filter/Sort" option is also enabled, but the form's open event does not filter anything and in the form's properties:
Filter = blank
Allow Filters = Yes
 
Last edited:
I found out what the problem is:

When both the form's Pop Up and Modal properties are set to Yes, The Filter options are disabled.

By making the form Modal but not Pop Up, I get all the filter options back.

I don't know if I can live with that though, because then the form will auto-resize to maximize
 
Last edited:
Okay. I know I'm totally answering my own thread here, but I have some good news!
I found a simple solution to the following situation:
1) The form really needs to open like a custom dialog box
(even if the previous form was maximized, this form will open and resize itself to the normal size) This means that when the form opens, it's Modal and PopUp properties HAVE to be 'Yes' and the Border Style HAS to be 'Dialog'
2) The form HAS to have full filter/sort options (unfortunately when you open a form as Modal AND PopUp, filter options get disabled).

This leaves you with the following problem:
If you set PopUp or Modal to No, the form will open and possibly maximize itself.
If you leave the PopUp and Modal as 'Yes' then you don't have any filter options.

Solution:
In the Form's properties sheet, set PopUp and Modal to 'Yes'
In the form's Open Event, set Me.Modal to False

Pros:
This will allow the form to open as a custom dialog box (thus preventing the form from possibly maximizing) then once the form gets to the Modal = False code, it has already opened the way you want and then you get the filter options back.

Cons:
The form will no longer act 'Modal' unless you write code to turn it back on at some point (or possibly write code on the form's LoseFocus event to give the focus right back to the form - not tested)
 
Ross, you are a genius! Thanks for this old post!!
 
Thanks so much for the simple and the quick way to fix the issue!
 

Users who are viewing this thread

Back
Top Bottom