CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: ComboBox

  1. #1
    Join Date
    Nov 2000
    Location
    IL, U.S.A.
    Posts
    218

    ComboBox

    I have made a database program with the VB wizard. I have one record with three fields in it.
    I want to be able to put one of the fields into a combo box. Can someone tell where to start?


  2. #2
    Join Date
    Mar 2001
    Posts
    71

    Re: ComboBox

    Hi there.

    I am assuming that you have fetched the recorset and the name of you recordset is 'rs'

    So you will create a loop

    Do while not rs.eof
    combobox.additem(rs("column name"))
    rs.movenext
    loop


  3. #3
    Join Date
    Nov 2000
    Location
    IL, U.S.A.
    Posts
    218

    Re: ComboBox

    Thanks!! I found the rs in another program. Here is the code.

    Public WithEvents rs As ADODB.Recordset

    Private Fields As ADODB.Fields
    Private fld As ADODB.Field

    Set fld = Fields(cboName.Text)
    ShowProperties

    This did not work and I do not understand any of the code.


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

Featured