Filter by form

mjmartin

Registered User.
Local time
Today, 00:31
Joined
Jul 29, 2004
Messages
28
Ok for searching I want to use the 'filer by form' method in Access.
filform.jpg


When this user clicks this tool bar, the form goes blank, the user type what they want in the fields they want and when they press the 'Close' button:
filclose.jpg


Access adjusts the filter to records that are LIKE what the user entered.

Is there a way to do this in VBA? I want to create a button called Filter by Form which when pressed turned into a 'Close' button which then pressed applies the user's search parameters. The reason why I need to do this with a button is that I don't want to give users access to the toolbar.

Any ideas?
 
Depends on how you are going to allow the user to select what they want to filter on. Here are some commands that you will need to learn how to use. Check the help files for more info on how to use them.

FilterOn = True
DoCmd.ApplyFilter
DoCmd.RunCommand acCmdFilterByForm
DoCmd.RunCommand acCmdFilterBySelection
DoCmd.RunCommand acCmdFilterExcludingSelection
 

Users who are viewing this thread

Back
Top Bottom