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?
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.
0

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
mbizupCommented:
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.
0
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?
  • FILTER BY FORM
  • APPLY FILTER
  • CLEAR ALL FILTERS
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Dale FyeCommented:
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.
0
mbizupCommented:
>> 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:

http://www.helenfeddema.com/Access%20Archon.htm
0
EirmanChief Operations ManagerAuthor Commented:
Many Thanks

I'll probably use a custom toolbar in the short term and develop a separate search form
0
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
Me.Refresh

Open in new window

1
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.