Results 1 to 2 of 2

Thread: Display Data in combobox 2

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2000
    Location
    Horst
    Posts
    262
    Hi vbuser1976 and the rest of u.

    After changing the code a bit it worked. However I can show only 1 field in the combobox, FunctieID or Description. How do I show them both?

    If I type:
    cboHell.AddItem Rs.Fields("functieID", "Description")
    I get an error that I must use a listseperator.

    Please advice.

    Thanx.

    (The code I use to populate the combobox)
    PS1: I named the combobox: cboHell :-)
    PS2: I do not like to get 1000 errors before monday morning 9 o'clock!


    Private Sub PopulateComboBox()

    'Comboboxname.Clear
    cboHell.Clear
    Rs.ActiveConnection = Cn
    Rs.Source = cstFunctie
    Rs.Open
    Do Until Rs.EOF
    cboHell.AddItem Rs.Fields("functieID")
    Rs.MoveNext
    Loop

    Rs.Close
    Set Rs = Nothing
    End Sub

  2. #2
    New Member
    Join Date
    Sep 2000
    Posts
    12
    Hi,
    you can try this
    cboHell.AddItem Rs.Fields("functieID")& " " & Rs.Fields ("Description")

    good luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width