Solved

Not In the list cascading combox

Posted on 2014-04-22
6
205 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
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 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 119

Expert Comment

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

910 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

22 Experts available now in Live!

Get 1:1 Help Now