Full Version: Limit Combo Box List By Value In 0" Column
UtterAccess Forums > Microsoft® Access > Access Forms
KenThompson
Hello,
I have a form with several combo boxes. All have same Control Source but different Row Sources. The tables for the selections have three fields; a PK, selection, ActiveSwitch. The behavior I'm try to implement is working in one Combo Box whose Row Source is a query. The query has all three fields of the table, with the criteria for the ActiveSwitch field "= Yes". This limits the list in the combo box to only the selections that are marked active.
My question is how to do this with combo boxes whose Row Source are tables?
Thanks,
Ken
theDBguy
Hi Ken,
welcome2UA.gif
What version of Access are you using? I think you'll have to convert the Row Source from a table into a query.
Just my 2 cents...
KenThompson
2007. I thought that might be the case. Thanks DBGuy
theDBguy
Hi,
Give it a try and let us know what happens. Good luck!
KenThompson
That seems to have worked fine. I was just trying to avoid having 5 or 6 queries that do nothing but put a criteria on that active field. I guess I need to find the balance between searching for answers and asking... I spent at least 3 hrs googling and searching, trying to figure out how to do this. Then once I asked theDBguy answered within 10 minutes. Good thing I don't get paid on productivity. dunce.gif
theDBguy
Hi Ken,
On case you are not aware, you don't need to create a query just for the combobox. In the Row Source property, you can click on the build button (three dots) to construct the query from within the combobox. That way, your database won't be cluttered with queries you don't really need to see.
Hope that makes sense...
KenThompson
It does make sense, and sounds like a good idea. Thanks again, DBguy!
theDBguy
Hi,
o problem. Glad we could help.
C
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.