Populate one combo based on anothers value

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

Hi there,

I have 2 combo boxes cboCategory and cboAsset. I want to select a
Category from cboCategory and have the assets that belong to that
category come up in cboAsset. I have tried to follow tips found on
this NG but my list will not populate into cboAsset, the list is
blank.

Here is my RowSource for cboCategory....

SELECT tblCategories.AssetCategoryID, tblCategories.AssetCategory
FROM tblCategories;

AfterUpdate for cboCategory....

Private Sub cboCategory_AfterUpdate()
Me![cboAsset].Requery
End Sub

Here is my RowSource for cboAsset....

SELECT qryAssets.AssetCategory, qryAssets.AssetDescription
FROM qryAssets
WHERE (((qryAssets.AssetCategory)=[forms]![frmAssets]![cboCategory]));


Can someone please help me sort this out, any help is appreciated.

Rick Ashton.
 
Rick

Have you tried selecting your category on your form (please confirm that
your form's name is "frmAssets") and then running the query for Asset in the
query design window?

Have you tried just running the query for cboAsset, hardcoding in a
categoryID value?

Is there any chance you have an underlying "lookup" data type field defined
in your table(s)?
 
Back
Top