Cannot enable Apply Filter / Sort button

My form has no toolbar visible (by design)
I have a Command Button that activates Filter By Form (works fine)
My Apply Filter / Sort Command Button is greyed out and I cannot enable it.

Any ideas ?

Runtime Error 2448
LVL 24
EirmanChief Operations ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gustav BrockCIOCommented:
It doesn't work that way. When you set the form in "Search by form" mode, everything else is disabled.
So use the band to activate the search.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
As Gustav said, the filter by disables everything, including the vba event procedures behind controls that appear active (so you cant even use the click event of a textbox disguised as a command button).  The only alternative to toolbars/ribbons when using Filter By Form is to train the users to use the built-in right click menu (if you don't have that disabled as well).

Alternatively, design a dedicated custom filter form.
EirmanChief Operations ManagerAuthor Commented:
so you cant even use the click event of a textbox disguised as a command button
I had already tried that!

Would a temporary Pop-Up form with three buttons work?
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

Dale FyeOwner, Developing Solutions LLCCommented:
If I need to be able to filter by more than a couple of fields (which I can place in the form header), I will generally create  a popup form with all of those fields, and two buttons, Cancel and Apply Filter.  Then, I use the "On Filter" event of the main form to enable / disable the Clear Filter button on that main form.  

So, the main form would have buttons Filter (which raises the popup) and Clear Filter.  And the popup form has buttons Cancel and Apply Filter.  Of course, that Apply Filter button now has to have a bunch of code behind it to build the filter that the FilterByForm does for you.
>> Would a temporary Pop-Up form with three buttons work?

Unfortunately not... since the commands apply to the currently active form.  It would be trying to apply the filter to your popup.

Helen Fedemma has a fairly elaborate custom filter example.  Look at sample 129, Fancy Filters, here:
EirmanChief Operations ManagerAuthor Commented:
Many Thanks

I'll probably use a custom toolbar in the short term and develop a separate search form
EirmanChief Operations ManagerAuthor Commented:
Toolbars & QAT are still hidden. I settled for this ...

FILTER BY FORM ............... Command Button > DoCmd.RunCommand acCmdFilterByForm
APPLY FILTER .................... Right Click on Form > Apply Filter/Sort
CLEAR ALL FILTERS ........... Command Button > DoCmd.RunCommand acCmdRemoveAllFilters

EDIT: This is better than acCmdRemoveAllFilters as it produces no errors if there is no filter in place.
Me.FilterOn = False

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.