I am very new to Access. I have gotten the hang of creating combo boxes; but...
I have a form in which I am trying to populate data for three cascading combo boxes.
I want to have user select a category and then select a Product from that category and then have a list of carriers (of the products from the categories) be populated.
I can get the first two to populate, but get nothing to show in the third.
The three combo boxes are (in order):
1. cboCategories
2. cboProducts
3. cboCarriers
The table is the Products table.
Here is a summary of the elements used:
3 combo boxes
COMBO BOX 1:
Unbound combo box name: cboCategories
In Properties, the rowsource is the table Categories
For Event / After Update, there is this:
Private Sub cboCategories_AfterUpdate()
Me.cboProducts.RowSource = "SELECT DISTINCT ProductName FROM " & _
" Products WHERE CategoryID = " & Me.cboCategories & _
" ORDER BY ProductName"
Me.cboProducts = Me.cboProducts.ItemData(0)
End Sub
COMBO BOX 2:
Unbound combo box name: cboProducts
There is no rowsource information in the Properties
For Event / After Update, there is this:
Private Sub cboProducts_AfterUpdate()
Me.cboCarriers.RowSource = "SELECT Carriers FROM " & _
" Products WHERE CategoryID = '" & Me.cboCategories & "' AND " & _
"ProductName = '" & Me.cboProducts & "' '" & _
"'ORDER BY Carriers"
Me.cboCarriers = Me.cboCarriers.ItemData(0)
End Sub
COMBO BOX 3:
Unbound combo box name: cboCarriers
There is no rowsource information in the Properties.
There is nothing for Events / After Update
I HOPE YOU CAN APPRECIATE THAT I KNOW FAIRLY LITTLE ABOUT THIS PROCESS; HOWEVER, I AM HOPING SOMEONE CAN GIVE ME GUIDANCE SO THAT I CAN MAKE THE THIRD COMBO BOX POPULATE.
ANY HELP WOULD BE GREATLY APPRECIATED.