Discussion Locked

Help with Combo boxes and List Boxes

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a database with only one table named "Contacts Data", in this table I have this fields:

1.- ContactID (autonumber)
2.- Contact's name (Text field)
3.- Contact's E-mail (Text field)
4.- Contact's Institution Name (Text field)
5.- Institution Type (Combo box with Value List)
6.- Contact's Country (Combo box with value List)

Also have a Form named "Send Mail" based on "Contacts Data" Table with this controls:

1.- List Box named "List0" with 4 columns: ContactID (not visible), Contact's E-mail, Contact's Name and Contact's Institution Name.

2.- Combo box named Combo6 with value list, based on Institution Type field of Contacts Data Table.

3.- Combo box named Combo2 with value list based on Contact's Country field of the same Table.

4.- Command button named Command1.

I want to bo able to select a value of Institution Type in a Combo6 to filter data in Combo2: "Contact's Country" in that way that when I open this Combo2 only appears countries where exist this Institution Type. And when select a Country from this Combo2, the selection filter all data in a List box in that way that only show Contacts Name, Contacts E-mail and Contacts Institution Name belong for this country and institution Type.Then select all e-mail addresses I need from this list to send a email using a Command1 button.

This final part of sending e-mail with the Command1 button I already Know how to do, because a question asked by me in the past in this Site. the helpI need is with all previous steps.

Can anybody help?

Thank a lot.

3 replies

by bristar

Assuming you are in Access, I would suggest having your combo box 2 consist of two columns (at least) containing coutries and instituition type. If a country matches more than one inst. type, it would require multiple entries in the table. Then, all you would have to do is set a one-to-many relationship showing all the fields in combo box 1 and only those in combo box two where they match. You should easily get the rsults you want.

This discussion is closed to new replies.