What is the code for 'Filter by Selection'

  • Thread starter Thread starter LisaB
  • Start date Start date
L

LisaB

DoCmd.DoMenuItem acFormBar, acRecordsMenu, ?, ?, acMenuVer70

What is the code for the 'Filter by Selection' menu option?

I Know this is the code for the 'Remove /Sort' option
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 3, , acMenuVer70

Thank You
 
Try:
RunCommand acCmdFilterBySelection

If you are doing this from a command button, you will need to SetFocus back
to Screen.PreviousControl, because you cannot filter on a command button.
 
Back
Top