Clearing criteria in filters

iazcac

Registered User.
Local time
Today, 09:42
Joined
Sep 15, 2004
Messages
65
Hi

I have a filter button on my toolbar to search for records.

When i press this button, it lets me enter my criteria.
However, it contains the previously entered criteria from the last search(es)
I also have another button to clear the grid of these criteria on the toolbar

Is it possible to combine these two and create a new toolbar button which first clears all the previous criteria before allowing me to enter new criteria into a blank form?

Chris
 
Add this code to your button

To apply filter : DoCmd.ApplyFilter , "Your Criteria"

To show all records : DoCmd.ShowAllRecords
 
to clear your previously inputter criteria simply put

Me.YourFieldname = null
 

Users who are viewing this thread

Back
Top Bottom