2 for 1 if you solve this....same prob as newberc

wrekless

Registered User.
Local time
Today, 20:19
Joined
Jun 1, 2000
Messages
31
basically the same problem with sync. combo boxes...

Say I have three categories: Type of Toy, Name of Toy, Colour of Toy.

Types=Stuffed Toy, Computer Game etc.
Name=stuffed(Teddy Bear,winnie the pooh etc), computer(pokemon, tetris etc)
colour=teddy(white, brown),winnie(yellow, red etc.)
pokemon(black,grey),tetris(yellow,green)

..whew ok, what I'm basically trying to say is, I want to have pulldowns that associate one with the other. If i choose stuffed under type, in the next one I only want to see, Teddy and Winnie. And if I choose Teddy, I only want to see, white or brown in the next one.

Also, if type isn't selected, I want all names to be available (individualized, i should only see Teddy once, even though theres two colours). How can I do this?

Appreciate your help.

(by the way, I'm not really a toy guy, heh... it's actually nuclear plant elastomers, but hey, same concept right?)
 
There is a detailed and confusing SQL rowsource way of doing this but I'll stick to the simple way. I assume for this example that you have a table with the following field headings:

Type, Name, Color (I'm American)

On your form you have three combo boxes:

TypeComboBox, NameComboBox, ColorComboBox

First, make Type the rowsource of TypeComboBox. You can do this with a modified query.

Second, you will want to create a select query. You can do this in the design mode of the query builder. Have the first column Type and the second, Name. Under the Type column, use the condition "Like TypeComboBox". This will ensure that you will only see the Names of toys that have the same type as the TypeComboBox. Make this query the rowsource of NameComboBox.

Third, make a copy of that first query (described immediately above) and add on a third column to that query from the Color field. Under the Name column, use the condition "Like NameComboBox". This will ensure that you will only see the Colors of toys that have the same name as the NameComboBox and the same type as the TypeComboBox. Make this query the rowsource of ColorComboBox.

Use the GroupBy selection in the query builder to see names or types only one time.

Hope this helps.
 
Yeah this works but...

I can't reverse select this way.

I want to be able to select color first if I want, and then only see the names that apply to the colour, or only the types that apply to the colour.

And the same thing should happen after making two combobox selections.

Ex: choose brown as color. see football and teddy bear under name. or see sports and stuffed toy under type.

if i choose teddy bear next, i should only see stuffed toy under type.
 

Users who are viewing this thread

Back
Top Bottom