Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2004
    Posts
    64

    Unanswered: Populate Combo Box

    I need to populate a combo box into 3 columns not just one column as shown below
    I will appreciate any assistance


    While Not rs.EOF
    cbo2.AddItem (rs.Fields(0) & " " & rs.Fields(1) & " " & rs.Fields(2))
    If rs.EOF Then
    GoTo Exitna
    End If
    rs.MoveNext
    Wend

    Many thanks
    Peter

  2. #2
    Join Date
    Jul 2003
    Posts
    73
    I don't have Access at work to confirm - but I'm pretty sure you need to delimit your fields with the ; symbol - which will break it into columns:

    Code:
    While Not rs.EOF
    cbo2.AddItem (rs.Fields(0) & ";" & rs.Fields(1) & ";" & rs.Fields(2))
    If rs.EOF Then
    GoTo Exitna
    End If
    rs.MoveNext
    Wend
    Let me know how it goes.
    Joel Dixon
    Analyst Programmer
    Melbourne, Australia

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    In the ListBox of Acce$$ there is no AddItem Method

  4. #4
    Join Date
    Nov 2004
    Posts
    64
    Joel

    you are correct it works, Fantastic !

    Thank you

    Peter
    Gold Coast Australia
    Last edited by Peter.t; 11-17-04 at 03:15.

Posting Permissions

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