Combo boxes hate me...

  • Thread starter Thread starter Jayyde
  • Start date Start date
J

Jayyde

***********************CODE**

strCboSQL = "SELECT DISTINCT PC.iProductCategoryId, PC.sDisplayName
" _
& "FROM dbo_tblProductCategory PC " _
& "INNER JOIN dbo_tblProductCategoryValue PCV " _
& "ON PC.iProductCategoryId=PCV.iProductCategoryId " _
& "INNER JOIN dbo_tblProductCategoryHierarchy PCH " _
& "ON PC.iProductCategoryId=PCH.iProductCategoryId " _
& "WHERE iProductMasterId=" _
& intMasterID _
& " AND iProductCategoryParentId "
& "IS NULL "
& "AND iProductCategoryLevelId=" _
& Me.Controls("txt" & lvl)

With Me.Controls("cboLevel" & lvl)
.RowSource = strCboSQL
.Requery
.Value = .ItemData(0)
End With
*********************CODE**

My predicament: this code seems fine. I stop it, get the SQL, run it, and
it returns the category info just as it should. I stop it and run
..listcount in the immediate window and it comes back with 1 as it should.
The only problem is when it finishes the dang combo box is empty. Ok. So
then I check the column count, bound column, and column width properties: 2,
1, 0";<not 0>"--check. ARG. Can someone please let me know what could
possibly be going on here before I go crazy!? If you need to see the whole
sub getting called let me know, but this is the only code getting called for
the 1st combo boxes iteration through it, so I figured I'd start with it =\.

-Jayyde
 
Back
Top