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!

Multiple Combo Boxes 1

Status
Not open for further replies.

Troubled1

Technical User
Dec 16, 2003
6
US
Please Help !

I am designing a database that will be used for inventory. I have 3 combo boxes and 11 text boxes on the form. I would like combo box 1 to contain 4 zones (zone_1, zone_2, zone_3 and zone_4) each zone will have several sites (too many to list) and each site will have several pieces of equipment listed by serial number. I want to select a zone in combo box 1 and then be able to select a site in combo box 2 that is within that zone and then be able to select a serial number for a piece of equipment. The text boxes populate with information about the piece of equipment. ( I already have that working ) This would be the breakdown.

Combo1 Combo2 Combo3
Zone_1 Site Names Serial Numbers
Zone_2 Site Names Serial Numbers
Zone_3 Site Names Serial Numbers
Zone_4 Site Names Serial Numbers

I have tried everything that I could find on this Forum that deals with multiple combo boxes each depending on the other with no luck. Any help would be greatly appreciated.
 
This may help:

In the query for the row source of your 2nd combo box, put the field from the first combobox and set the criteria to be equal to the 1st combo box.

So for combo2 rowsource you would have something like this:

SELECT DISTINCT tablename.fieldnameforsitename
FROM tablename
WHERE (((tablename.fieldnameforzone)>[Forms]![formname]![Combonameforzone]));

and for the rowsource of the 3rd combo something like this:

SELECT DISTINCT tablename.fieldnameforserialnumber
FROM tablename
WHERE (((tablename.fieldnameforsitename)>[Forms]![formname]![Combonameforsitename]));

Hope that helps.
 
gwog,

Thanks for your help. I tried to set the combo box row source like you explained but, ran into a couple of problems. When I set combo box 2 row source to:

SELECT DISTINCT tablename.fieldnameforsitename
FROM tablename
WHERE (((tablename.fieldnameforzone)>[Forms]![formname]![Combonameforzone]));

I get an error “Enter Parameter Value” even when there is a value in combo box 1.

The second problem is that when I enter the parameter value in combo box 1 I get all of the sites listed not just the ones for a particular site.

thanks
 
Take a look at this thread thread702-743011 on a very similar subject. I think it should help.
 
Troubled1,

Sorry the > should be a = in both examples I gave.

My fingers didn't type correctly.

best of luck.

lisa.
 
My Thanks to Everyone that helped me with this problem. I have all three combo boxes synchronized and working great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top