Filter by form and Apply Filter

J

JF Bouthillier

Hi all,

I would like to have command buttons to 'Filter By Form'
and 'Apply Filter' in my form (not toolbar). What are
the two VBA lines that would allow me to do that?

Thank you,
JF
 
V

Van T. Dinh

Try:

* Filter-By-Form:

DoCmd.RunCommand acCmdFilterByForm

* Apply Filter

DoCmd.RunCommand acCmdApplyFilterSort
 
R

Rick Brandt

However; the second command below cannot be run from a button on the form as
Filter-By-Form will disable all buttons on the form.
 
J

JF Bouthillier

When I click on the 'Filter-By-Form', the 'Apply Filter'
does not work. Any suggestions?

Thank you,
JF
 
R

Rick Brandt

JF Bouthillier said:
When I click on the 'Filter-By-Form', the 'Apply Filter'
does not work. Any suggestions?

See my previous post in this thread. The apply filter button cannot be on the same
form. You will have to put it in a toolbar.
 
Top