Connecting Tech Pros Worldwide Help | Site Map

Filter By From, Apply Filter, Remove Filter Buttons in a Form.

Newbie
 
Join Date: Aug 2007
Posts: 5
#1: Aug 17 '07
Hi All, Trying to create a set of 3 buttons in a form that have the same effect as the "Filter by Form", "Apply Filter" and "Remove Filter" Buttons on the access toolbar. Help would be muchly appreciated. Cheers.
ADezii's Avatar
Expert
 
Join Date: Apr 2006
Location: Philadelphia
Posts: 5,214
#2: Aug 17 '07

re: Filter By From, Apply Filter, Remove Filter Buttons in a Form.


[quote=mattscho]Hi All, Trying to create a set of 3 buttons in a form that have the same effect as the "Filter by Form", "Apply Filter" and "Remove Filter" Buttons on the access toolbar. Help would be muchly appreciated. Cheers.[quote]

In the Click() Event of 3 Command Buttons, place the following code:
Expand|Select|Wrap|Line Numbers
  1. 'Filter by Form
  2. DoCmd.RunCommand acCmdFilterByForm
Expand|Select|Wrap|Line Numbers
  1. 'Apply Filter
  2. DoCmd.RunCommand acCmdApplyFilterSort
Expand|Select|Wrap|Line Numbers
  1. 'Remove Filter
  2. DoCmd.RunCommand acCmdRemoveFilterSort
Newbie
 
Join Date: Aug 2007
Posts: 5
#3: Aug 17 '07

re: Filter By From, Apply Filter, Remove Filter Buttons in a Form.


You are a legend! Thanks for your help!
Newbie
 
Join Date: Aug 2007
Posts: 5
#4: Aug 17 '07

re: Filter By From, Apply Filter, Remove Filter Buttons in a Form.


Sorry for buggin, But how do i keep the "Apply Filter" Button Active while the Form is in Filter mode? Cheers
Reply