PDA

Click to See Complete Forum and Search --> : I want to add some items from DB to a combo onload


cvaden
Jan 20th, 2000, 08:45 AM
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!

Forest Dragon
Jan 20th, 2000, 06:55 PM
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!!!