Command button to open 'Filter by Form' window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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).
 
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.
 
Back
Top