Populate one combo based on anothers value

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.
 
J

Jeff Boyce

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)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top