Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two boxes, first shows Items, the second shows Name. How!

Status
Not open for further replies.

gronsky

Technical User
Feb 8, 2002
36
US
Conumdrum:

I have a table(Produce)

Fields;

Item Name Type
apple Gala F
apple Granny Smith F
pear Bartlet F
celery Greenish V
orange Sunkist F
orange Navel F
turnip Yuck V

On a form I would like two list or combo boxes;

the first would show only one instance of an item, i.e.,
apple
pear
celery
orange
turnip

the second would refect the name of the item selected in the first box, i.e.,

if in the first box, apple was klikked, the second box would show;
Gala
Granny Smith

Any thoughts on how this would be accomplished?
If you would write your thoughts down it would be greatly appreciated. :)

Thanks

 
LOL, I can tell you're one of those people who never ate their vegetables as a kid.

Why not use 1 combobox or Listbox with 2 columns. That way you don't have to worry about synchronizing the 2 boxes. Maq B-)
<insert witty signature here>
 
Thanks for the reply Maquis.

I'm a newbie so some of these things, actually a lot of things, are beyond me.

This is what I'm attempting to create.

I do Heraldry, so I need to have a way to check against conflict with existing Arms.
To this end I want to create a way of searchng records for existing Arms by Fields, Partitions, Ordinaries, etc.

My thought was to have a table where many or all of the items were in a single column and a &quot;type&quot; column to differentiate the many types, e.g., all colors would be &quot;T&quot;, all ordinaries would be &quot;O&quot;, and so on.

So in the first box, I would like to be able to have, say the following;
Field
Ordinaries
Arrangement
Divisions
Beasts...

If in the first box &quot;Fields&quot; were klikked then in the second box all the records with &quot;T&quot; in the &quot;Type&quot; field would be displayed;
Argent
Azure
Gules
Sable...


Once that would happen I would like to make a selection from the second box, have that item, say Argent, appear in another box. Now I should be able to go back to the first box, make another choice, &quot;Beasts&quot; choose &quot;Lion&quot; from the second box concatenate it to the items in the third box using =[]&&quot; &quot;&[]...
There would be a couple more boxes with that would offer secondary features such as &quot;Orientation&quot;, &quot;Position&quot; Color2&quot;.

All this would go into the third box and from there I could do a search for let say, Argent, a lion guardant Gules

So that is why I would like to have the first box synched with the second.

Any ideas?

And Yes I did eat my veggies, just couldn't think of any brands of celery or turnips. ;)

 
Ohh, ok I understand what you want now. You basically need dynamic combo boxes that build their record sources based on earlier combo selections.

I've never done this in my databases so I don't feel comfortable giving you some code which I haven't tried myself, however I've seen the same question posted here many, many times. A quick keyword search turned a promising
faq and a thread that should help you out. faq702-681 and thread702-50739.

If those don't give you what you need then try searching Tek-Tips again for more references.

Good luck with the war! Maq B-)
<insert witty signature here>
 
Thanks for the faq links and your time.

I think more appropriatly..
&quot;Have storming the castle&quot;

:)

Have a great day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top