Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Not In the list cascading combox

Posted on 2014-04-22
6
Medium Priority
?
211 Views
Last Modified: 2014-04-28
Access 2010, How to update cascading combo boxes:  cboShopCountry,  cboShopState, cboShopCity with new values.
Can it be done through Not In the list event?
Do you have example?
0
Comment
Question by:Taras
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40016117
what exactly do you mean by update combo boxes?

the on not in list event is use to add items to combo boxes lists.
see this link
http://support.microsoft.com/kb/197526

post back if this is not what you want/need
0
 

Author Comment

by:Taras
ID: 40016784
Rey.

I mean what I said; you did not read my question.

I did not ask how to update one combo box with new value that is not one of values of list value or is not in the table/query depends what source combo box have.

I asked how to add new values in combo boxes that are connected as cascading combo boxes.
It means Selection that you pick up in cboA drives options in cboB and selection that you pick up in cboB drives option in cboC.

Now I want to give a user option  during entry data process on the form to add new value  in existing values in those combo boxes, not just to pick up one of those that are already in box A,B or C.
For not cascading combo box I will use Not in the List event, I know how to do that.
However those are cascading combo boxes as I said in question . Not single combo box with list value or table/query  as a source.
How to do this ?
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 40017173
I don't really understand your question either (and yes, I did read it, a couple of times).

The concept of "cascading" combos has no impact on adding new values. You can add new values to "cascading" combos just like you do any combo, by using the NotInList event (and you've indicated you know how to do that). The only issue you'd find would be that the newly added values would not necessarily be related to any upstream or downstream values, although you can enforce that relationship if needed.

Are you trying to relate values in downstream combos to the newly added values? So if I add a value of "Canada" to my ShopCounty combo, it should then be related to "Ontario", "Peterboro", etc etc? If so, then that would happen only if you've enabled that relationship at the table level (i.e. you've associated Ontario and Peterboro with the Country "Canada"). You could certainly force that relationship when the user adds new values, but you'd need a form to handle that. So your NIL event would show the user that form, and they'd add the new Country, and associate all relevant items in the cboShopState table with the new country.

If not, then please give a real-world scenario of what you're trying to achieve.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40017256
<Not single combo box with list value or table/query  as a source.>
so, how do you select a value from cboA?
0
 

Author Comment

by:Taras
ID: 40017611
Scott.
I am doing that second part that you referring to.
Let say I have tables tblCountry, tblState, tblCity.  I can create relationship between them and enforce referential integrity.
 
Let say in table Country I have three entries Germany, USA, France.
When I pick up country USA I have only four states (Michigan, Texas, Arizona, Colorado) showing in State combo box those ones that I have shops in not all states.

Then when I pick up one of those states e.g. Michigan then in City combo box I have only e.g. five cites, those five are cites  that I have shops in  from state Michigan.


Following your suggestion let say
Now I want to add new shop in city Peterborough that is in province/state Ontario that is in country Canada.
You are suggesting to do that trough new form that will pop up at NIL of combo box cboCountry.
Then this new form will have fields for entering new Country , State/Province  and  City ?

Can you give me more detail or one example what do next. I have some clue but not sure is this ok or possible??

Are you suggesting on this new form those tree boxes for entering new Country, State and City to be combo boxes or simple text boxes?
Let say they are combo boxes, then why I need to go at NIL  to this new  form when I had those three combo boxes on existing form.
Further
If they are combo boxes on this new form,  then combo box cboCountry is base on tblCountry and  cboState and cboCity are based on queries as we need cascading connection.
Those two  queries will have foreign keys in that will come from cboCountry(query for cboState record source) and cboState(query for cboCity record source)
Then in after update event of each of those three combo boxes I will do require of other two.

Is that proper and possible way to try??
0
 

Author Closing Comment

by:Taras
ID: 40027637
Thanks.
0

Featured Post

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question