Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Sep 2006
    Location
    Quilmes, Argentina
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Poulating ComboBox (VB6)

    Hi all,
    I'm trying to populate a ComboBox with a recordset.
    The problem is that I need to add more than one item per line (record) of the recordset, i.e. my ComboBox has three columns!

    I'm waiting for your help anxiously!
    Thanks in Advance!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Poulating ComboBox (VB6)

    As far as I know, a combo box in VB6 has only one column. You could concatenate the three fields in your recordset.

  3. #3
    New Lounger
    Join Date
    Sep 2006
    Location
    Quilmes, Argentina
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Poulating ComboBox (VB6)

    Hi Hans,
    Thanks for your response!
    I knew that too so I added to the toolbox the <code>Microsoft Forms 2.0 Library</code> in order to use Access combo box
    It seems that this combo allows more than one column but the problem is that when I tried to populate it using the Rowsource property is not available!!

    However, I've already concatenated the columns in order to move on with the form but if anyone else has another solution I will be very pleased to read it!

    Regards!

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Poulating ComboBox (VB6)

    The Forms library is the one used by UserForms in Word and Excel, it doesn't provide the functionality of Access forms.
    The combo box from the Forms library does have a RowSource property, but it can only be set to a worksheet range in Excel.
    You could fill a two-dimensional array from the recordset, then set the List property of the Forms combo box to this array.

Posting Permissions

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