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

Combo box dependent on 1st combo box - text portion is blank

Status
Not open for further replies.

lorirobn

MIS
Mar 15, 2005
450
US
Hi,

I have a continuous form that includes 2 combo boxes, Category and Subcategory. Record source is a query of Item Table. I am displaying descriptions, not ID's, so I have to convert the ID's using lookup tables.

Subcategory drop-down box is dependent on category (for example, when Category is Furniture, Subcategory drop-down list is 'Dresser, Nightstand, Desk..."). Text portion displays the Description corresponding to the ID on Items table. The drop-down list for Subcategory works fine, but the text portion does not. When the form is displaying records from the Items table, records for category 'Accessories' displays fine (the first catgegory), but records for 'Furniture' (second category) display a blank subcategory. However, the drop-down list is correct; only the text portion is incorrectly blank.

If I display only subcategory ID, not description, it works fine. If I run the recordsource query, it displays subcategory ID correctly.

My SQL statement for subcategory is:
"SELECT ItemSubcatID, ItemSubcatDesc FROM tlkpItemSubcategory
WHERE (((ItemCategoryID)=[Forms]![frmItems]![cboItemCategory]))
ORDER BY ItemSubcatDesc;"

Column count is 2, column width is 0, 2. Bound column is 1.
Note that when I have column width = "1,1", subcatgegory ID is displayed correctly.

Anything obvious causing the text portion of my combo box to be blank?

Thanks in advance for any help,
Lori

 
ps - my drop-down list for subcategory is not correct after all. On records for 2nd category, Furniture, drop-down list is displaying items for 1st category, Accessories. Is my reference to Category on this continuous form incorrect? I get this feeling that it's only referencing the first occurrence of Category?
 
Be aware that in the detail section of a continuous form any unbound control has only one instance standing for all the records.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks, PH, but isn't that considered a bound control?
 
PS - is there a way to do what I am attempting, as follows:
-- have a continuous form
-- have one combo box dependent on another
-- have the 2nd combo box display values during display of form that correspond to 1st combo box's values FOR EACH ROW
???

thanks, Lori
 
I am running across this same concept / concern.

Has anyway come up with a clever solution to date?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top