By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,489 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 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, 33 views)
2 Weeks Ago #1
Share this Question
Share on Google+
2 Replies


twinnyfo
Expert Mod 2.5K+
P: 3,128
ArmenPerez68,

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.
2 Weeks Ago #2

NeoPa
Expert Mod 15k+
P: 31,273
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.
2 Weeks Ago #3

Post your reply

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