Multiple Combo Boxes

Barbara Sherman

New member
Local time
Today, 08:06
Joined
Jan 27, 2003
Messages
7
Please help. I am working with a form which will have multiple combo boxes and subforms which will interact. On Page 1 of the form the first 2 combo boxes are working perfectly. I used the AfterUpdate property and RowSource to indicate how Access should tie the combo boxes together. However I cannot get the 3rd combo box to work.

1st Combo Box selects a boat manufacturer.
2nd Combo Box selects the model (models shown are based on the manufactuer selected in Combo Box 1).
3rd Combo Box is to select color and color shown will depend on model selected. THIS BOX IS NOT YET WORKING.
There will be a NEXT button on this form page.

The next page should list the motors available for chosen model.

I tried with the 3rd Combo Box to set the property the same as the 2nd box. But it is not showing any colors as I move through the form. I know something is missing.

Any assistance with how to get the 3rd box to relate to the 2nd and so on down the line will be greatly appreciated.

Thank you in advance.
 
I am going to take a guess here, there are to many variable, but the most likely cause is the query the 3rd ComboBox is based on is not returning any data. So that being said, why is not returning data. If your 2nd ComboBox has more than one column, are you specifying the proper column to pull the colors for the model? Try using the Event Procedure in OnFocus event of the 3rd ComboBox to display the data elements you are trying to use in your query and see what it is truly pulling.
 
Presumably you have three tables (tbmfgr, tbboat, tbcolor), each being used in the recordsource of an combo box; because, tbmfgr is related tb tbboat is related to tbcolor:

tbmfgr combo box afterupdate, requery tbboat combo box
tbboat combo box afterupdate, requery tbcolor combo box

Presumably:

tbmfgr
mfgrID
smfgrname
etc.

tbboat
boatID
mfgrID
sboatname
etc.

tbcolor
colorid
boatID
mfgrID
scolor

combobox names:
Manufacurer: cbomfgrid
Boat: cboboatid
Color: cbocolorid
etc.

tbmfgr combobox recordsource:
select * from tbmfgr order by smfgrname;

tbboat combobox recordsource:
Select * from tbboat where (mfgrID=me!cbomfgrid) _
order by sboatname;

tbcolor combobox recordsource:
select * from tbcolor where (mfgrid=me!cbomfgrid and _
boatid=me!cboboatid) order by scolor;
 

Users who are viewing this thread

Back
Top Bottom