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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

3rd Level Popup List

Status
Not open for further replies.

fireburner69

Programmer
Aug 22, 2002
108
GR
I would like to create 3 popup lists that the one will be affected by the previous one!

For example: When I will select the 1st Popup list, the second one will be field with the values from the selected category.
And again when I select the 2nd one the 3rd will be auto generated.

Is there anyway to do that in access?

POPUP list is the select list in HTML! :)
 
The principle is as follows:
For the first combo box you add code to the AfterUpdate event procedure which forces the contents of the second combo box to be recalculated.
The rowsource of the second combo box is a query which uses the value of first combo box as selection criteria for the records displayed.

So if the combo boxes are called cbo1 and cbo2 you might have something like this.

Sub cbo1_Afterupdate()
me.cbo2.requery
end sub

Rowsource for cbo2:
select field1 from mytable where field2 = forms!thisform!cbo1

You then do the same for the links between cbo2 and cbo3
me.cbo3.requery in the afterupdate event for cbo2 and a similar rowsource expression for cbo3.

The precise code obviously depends on the names of your tables, fields and combo boxes and their datatypes.








 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top