Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Not In the list cascading combox

Posted on 2014-04-22
6
Medium Priority
?
213 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 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

877 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