Solved

Not In the list cascading combox

Posted on 2014-04-22
6
204 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
  • 3
  • 2
6 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
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
Comment Utility
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 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
Comment Utility
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
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
<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
Comment Utility
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
Comment Utility
Thanks.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now