View Full Version : Filter Command Buttons


marcwmu
08-07-2001, 10:02 AM
To sort some of the data on one of my forms I would like to put my own filter buttons in. In the button wizard I can easily put an "Apply Filter" button in my form. I would like to put the other two filter buttons in too. I can not figure this out. There are even Icons for them in the wizard just no way for me to choose them.

I guess I just need to make the button and do the OnClick event, but i dont know what code to type to do the "Filter by Selection" or the "Filter by Form".

Thank you
Marc

marcwmu
08-07-2001, 10:14 AM
This is the Event Porcedure for the "Apply Filter" button:


Private Sub Command49_Click()
On Error GoTo Err_Command49_Click


DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70

Exit_Command49_Click:
Exit Sub

Err_Command49_Click:
MsgBox Err.Description
Resume Exit_Command49_Click

End Sub