Command button to open 'Filter by Form' window

A

Access Joe

Does anyone know how I can create a command button to open the 'Filter By
Form' option? These aren't Access savvy people, so I'd like the users to
stick with the buttons I provide on the form rathert than trying to hunt down
the options from the menu.
Thanks
Joe
 
F

fredg

Does anyone know how I can create a command button to open the 'Filter By
Form' option? These aren't Access savvy people, so I'd like the users to
stick with the buttons I provide on the form rathert than trying to hunt down
the options from the menu.
Thanks
Joe

DoCmd.RunCommand acCmdFilterByForm
 
V

Van T. Dinh

While Al gave you the correct VBA statement, you cannot use this in a
CommandButton on your Form since the CommandButton will disappear when you
activate the Filter-By-Form. When the Filter-By-Form is activated, I think
Access overlays your Form with the Filter form which is a copy of your Form
with all CommandButtons on the Form removed (AFAIK).
 
G

Giuliano A. Mazzina

Yes, I did find that out. However, I did use the DoCmd.RunCommand
acCmdRemoveFilterSort command as a button to view all my records after I
applied a filter. Thanks.
 
Top