What is the code for 'Filter by Selection'

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
 
A

Allen Browne

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