VB in Access: Combo Box Values are not visible in form view but are visible through Debug.Print

Posted by Thor on Stack Overflow See other posts from Stack Overflow or by Thor
Published on 2009-04-06T19:17:36Z Indexed on 2010/04/12 14:03 UTC
Read the original article Hit count: 339

Filed under:
|

Code in Form onLoad:

  country_combo.RowSourceType = "Value List"

Code in a reset function:

  Dim lListIndex As Long

  With Me.country_combo
    For lListIndex = .ListCount - 1 To 0 Step -1
      .RemoveItem (lListIndex)
    Next lListIndex<br/>
  End With

Code to populate country combo:

  *For n = 1 To numCountries*
    *countryCombo.AddItem (countryRS.Fields("countryName"))*
    *countryRS.MoveNext*
  *Next n*

I'm having a problem that occurs AFTER the code to populate the country combobox runs. The values are there as I can run Debug.Print(countryCombo.Value) and it prints out the name of the selected country, but I can't see the values in the combobox at all. They're invisible, and as far as I know there is no visiblity property for specific items, unless I'm completely mistaken.

comboBoxError.png

© Stack Overflow or respective owner

Related posts about vb

Related posts about ms-access-2007