Results 1 to 2 of 2

Thread: I want to add some items from DB to a combo onload

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    norcross, ga, USA
    Posts
    82

    Post

    Basically i have this:
    names title
    _____ _____
    text1 title
    text2 title
    text3 title
    text1 test1
    text2 test1
    text3 test1
    ...and so on

    What I want to do is "grab" all of the title column and add it to a combobox, but only one of each since there are duplicates and unique items in each field.

    -->Or more like VB<--
    On load get all titles from the DB and put them in this combobox, but don't list duplicates!

    Thanks in advance guys!

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Posts
    253

    Post

    I don't know which access type you are using (DAO, RDO, ADO), so I'll give you general instructions:

    1. Create a SQL query like this one:

    SELECT DISTINCT Title FROM Table

    This will give you all the values of the Title field, but in case of a duplicate value, you will get it only one time.

    2. Take the results and put them in the ComboBox. You can also use an ActiveX like the DBCombo or the DataCombo which will make it easier.

    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