D
Darryn
Hi all
I have three bound combo boxes on my form and have read many posts
about how to get the contents of one box to limit the selections in
the next one.
The examples I have seen have mainly used an unbound box but I need it
bound to enter info into a main table. Here is the details of what I
have tried so far to get just the first two working,
Combo 1 named cboCategoryID
looks up the main category from
TblCategory (PK)
CategoryID
Category
its row source is set to TblCategory, columns 2 bound column 0
with the followoing procdure to requery the combo box
Private Sub cboCategoryID_AfterUpdate()
Me!cboSubCategID = Null
Me!cboSubCategID.Requery
End Sub
Combo 2 named cboSubCategID
looks up the sub category from a junction table
TblSubCategories
SubCategoryID (PK)
SubCategory
CategoryID
I have its row source set as the following statement
SELECT TblSubCategories.SubCategory
FROM TblSubCategories
WHERE (((TblSubCategories.CategoryID) Like
[forms]![FrmEquipment]![cboCategoryID]));
From what I have read this should make combo 2 look at the first combo
for its row source, but I can't get to work. I have tried changing to
bound column of combo 2 from 0,1,2 but this has no effect.
Can anyone help me as to what I am doing wrong
Thanks
Darryn
I have three bound combo boxes on my form and have read many posts
about how to get the contents of one box to limit the selections in
the next one.
The examples I have seen have mainly used an unbound box but I need it
bound to enter info into a main table. Here is the details of what I
have tried so far to get just the first two working,
Combo 1 named cboCategoryID
looks up the main category from
TblCategory (PK)
CategoryID
Category
its row source is set to TblCategory, columns 2 bound column 0
with the followoing procdure to requery the combo box
Private Sub cboCategoryID_AfterUpdate()
Me!cboSubCategID = Null
Me!cboSubCategID.Requery
End Sub
Combo 2 named cboSubCategID
looks up the sub category from a junction table
TblSubCategories
SubCategoryID (PK)
SubCategory
CategoryID
I have its row source set as the following statement
SELECT TblSubCategories.SubCategory
FROM TblSubCategories
WHERE (((TblSubCategories.CategoryID) Like
[forms]![FrmEquipment]![cboCategoryID]));
From what I have read this should make combo 2 look at the first combo
for its row source, but I can't get to work. I have tried changing to
bound column of combo 2 from 0,1,2 but this has no effect.
Can anyone help me as to what I am doing wrong
Thanks
Darryn