By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,647 Members | 1,444 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,647 IT Pros & Developers. It's quick & easy.

Applying and Clearing Filters

P: 49
I have a filter that is applied on the click of a command button. If you click the button to remove the filter and show all records and then choose to do another filter with a different location you get the same data as the first time is there something I need to do duifferently
I have included the code for both the apply filter and the show all records
Apply
Expand|Select|Wrap|Line Numbers
  1. DoCmd.ApplyFilter "fltr_drawingsite", ""
  2. Me!Floor.Requery
  3.  
Expand|Select|Wrap|Line Numbers
  1. Me.FilterOn = False
  2. Me!Combo48 = ""
  3.  
Clearing the filter seems to be working
Apr 14 '08 #1
Share this Question
Share on Google+
2 Replies


P: 23
User the Filter Property of the Form to Filter Data.

Example to Apply the Filter:

Me.Filter = "EmployeeCode = 1234"
Me.FilterOn = True


To Remove the Filter:

Me.FilterOn = False

will remove the filter. You can run the Code with Command Button or any other appropriate Event Procedures.
Apr 15 '08 #2

P: 49
User the Filter Property of the Form to Filter Data.

Example to Apply the Filter:

Me.Filter = "EmployeeCode = 1234"
Me.FilterOn = True


To Remove the Filter:

Me.FilterOn = False

will remove the filter. You can run the Code with Command Button or any other appropriate Event Procedures.
Thanks for the reply I have tried that and it works exceept the criteria for the filter comes from a combo box.
Apr 15 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.