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

Filter on form to display the data to filter

P: 1
Hello I have the below that I want it to display the data to select to filter but only giving me the option to text filter. Example the filter to list, Houseware, Food, Clothing etc not just give the filter type of "equalts, Does not equal, begins with etc.
Expand|Select|Wrap|Line Numbers
  1. SetFocus
  2. DoCmd.GoToControl "Product Type"
  3. DoCmd.RunCommand acCmdFilterMenu
  4. End Sub
Any suggestions?

Attached Images
File Type: jpg Form filter button.jpg (28.0 KB, 69 views)
Apr 5 '19 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 2.5K+
P: 3,283

Welcome to Bytes!

We really appreciate more clear and detailed questions from our posters. I am not sure what your actual question is....

However, based upon your code, the database is doing exactly as it should. If you have text values, it is going to provide a text filter that is contextually based upon the data in your field.

Hope this hepps.
Apr 6 '19 #2

Expert Mod 15k+
P: 31,489
Hi Armen.

It sounds like you want it to work like Excel does with a list of values when using AutoFilter. Access isn't Excel. For that sort of functionality you'd have to add a ComboBox control to your form yourself and program it to do what you need. It isn't inbuilt.

Access is a database program so, whereas it may be practical for Excel to do that work for every list it has, Access isn't working with such simple, one-dimensional, lists. It could potentially cause so many problems that it's not something anyone should wish for. Just add it yourself in those circumstances where it can make sense.
Apr 7 '19 #3

Post your reply

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