Full Version: Show "filter by form button"
UtterAccess Forums > MicrosoftŪ Access > Access Forms
andreihortua
I want to display in a form the "filter by form ", "clear grid" and "apply filter" buttons whose appears right clicking on the form, but I would like to have then directly on the form.
How it can be made? What code do I need?
freakazeud
Hi,
have a look at the command button wizard. That should help you.
Additionally you can use:
e.Filter = ""
For a custom clear filter button!
HTH
Good luck
andreihortua
Thanks. I've alreeady looked at wizard but it does'nt appear on it i think its would be something like:
oCmd.DoMenuItem acFormBar, acFilterByForm,
But I dont know what follows
freakazeud
Hi,
what do you mean it doesn't appear on it! If I create a button with the command button wizard and select form operations and filter form it creates a button which works. The code behind it is:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70
HTH
Good luck
andreihortua
Yes, that it's the code behind, but it filters using an unknown criteria, but I would like that the form changes to blank combobox fields and appears tabs "look for" and "or" on the bottom.
vtd
The code to open the Filter by Form is:
DoCmd.RunCommand acCmdFilterByForm
The only problem for you is that when this Filter Form opens, Access will hide all CommandButtons on the Form and in effects, you cannot have the CommandButtons for ClearGrid and ApplyFilter.
andreihortua
Yeah Thanks,
laugh.gif
Other buttons shall be accessed by menu bar.
vtd
You're welcome ... Glad you worked it out ...
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.