Populate combo2 while combo1 is selected with any value

meprad

Registered User.
Local time
Today, 05:07
Joined
Sep 12, 2012
Messages
14
I have two comboboxes in access form. what i want is if i select "A" from combo1, I want to have one value to combo2 could it be "x" or "y" or "z" but of my choice.. After combo1 is selected "A", I want automatically pop, lets say, "y" or any value i want may be "z" at combo2 of the form. :-). Combo2 also has list of values (x,y,z) fetched from table.

Please note that both combos are fetched from tables that contains two columns (ID, name) and combos are fetched by binding first column and assigned column count 2; so that it shows the values rather than numbers. Moreover, the combos are allowed to store multiple values (defined in master table)

Appreciate for your help

Many thanks
Prad
 
this is called a "cascading combo." use that as your search terms.
 
You may want to check out this thread before answering

http://www.access-programmers.co.uk/forums/showthread.php?p=1250878#post1250878

@MePrad - we want to help but please try and rephrase your question differently, provide some real examples of your data and what you want to see as a result, asking the same thing 3 times will not produce different answers - it tells you something about the question
 
Ohh gosh! its really silly to post the unclear question for multiple times. apologies :o. I tried to make it clear through the attached diagram. I hope i made it clear there :banghead:

Prad
 

Attachments

  • diagram.JPG
    diagram.JPG
    54.9 KB · Views: 80
Makes a big difference, much clearer now:) but requires some more clarification

To help provide a solution, please can you post the following information behind each combo box - the solution depends on what you have

ControlSource
ControlSource Datatype and if allow multiple values=true
Rowsource
Bound Column
No of Columns
Column Widths

And just to check, these are definitely combo boxes and not list boxes? (reason for checking is combo boxes cannot be multiselect unless the controlsource is a multiple value type)

Also just to check - if the controlsource is a multiple value type, does it need to be? It looks to me like your options could be mutually exclusive i.e. a program cannot be Access 97 AND Access 2000 (they are mutually exclusive), but it could be Available with Access 97 and Access 2000 backends (so not mutually exclusive) - depends on the context
 
Many thanks CJ for your response. This database is created in Access 2010. I have Mastertable which has lookup field and other details you're interested to see which are shown in my attachment :)
thanks a lot for your concern and help;)

Prad
 

Attachments

  • Field properties.JPG
    Field properties.JPG
    92.6 KB · Views: 84
Thanks,

Your control source for Combo 1 is Table1 but the mastertable field is called Table1Name - which is correct? Or is Table1 the name of a field in another table? If so, please provide the field table details for this other table as per the top part of your image. Ditto for combo2

Please can you also answer my other question

Also just to check - if the controlsource (i.e. Table1) is a multiple value type (like Table1Name), does it need to be? It looks to me like your options could be mutually exclusive i.e. a program cannot be Access 97 AND Access 2000 (they are mutually exclusive), but it could be Available with Access 97 and Access 2000 backends (so not mutually exclusive) - depends on the context

Should be able to provide a solution once the above are all answered
 
Sorry to butt in.. but, Prad, Table level LookUp's is not a good design.. I am not able to follow your requirement, but CJ seems to have a hold on this.. So I will let him carry on, to make things easier, try removing lookups..
 
@Paul - all help gratefully received!

Prad is actually using a multivalue field, hence the lookup but I am questioning whether that is actually required - I suspect not and if so the lookup can be gone making life much simpler!
 
just quickly for CJ: mastertable field is Table1field. table1 is not the field of any table.

Dear CJ and Paul: Thanks a lot for your heads up for providing such an important issue of using lookups. I am new to Access.. I absolutely agree with CJ that lookup is not required but I was asked to keep the fields for multiple selection -coz the scenario is : lets say the form is to collect information on Access users with diff versions. If in a case, suppose one uses Access 97 or 2000 or 2010 or ALL (combo1), its platform is Microsoft (combo2) that should pop in combo2 (we dont care about the rest of the options in combo2).

On the contrary, if combo2 selected other than Microsoft, combo1 should be cleared (blank) not really linked much with the scenario described though....

if lookup is removed - Please suggest how will I be able to choose Access97 and Access2000 together in combo1

many thanks to both of you for your patience to understand the issue:)
 

Users who are viewing this thread

Back
Top Bottom