Hello,

I would like to tie a dropdown list to my dataset that i have populated from my database.
however, there are repeated values in the datatable.

my table is as below...

    BMNO          CellName
    123           office
    242           office
    678           production
    290           production
    101           productiom
    890           stores
    512           Goods In
    514           Goods In
    900           Dispatch

Is there a way to add each cell name once to my dropdown list?

Thank you for looking and any help!

Iain

You could make the dropdown to collect the data from a dataset with a select command that selects unique records for the CellName:

SELECT UNIQUE CellName FROM Table

Thank you,
I will give that a go!!

i get a syntax error with that command...

Syntax error (missing operator) in query expression 'UNIQUE ProdCell'

ah I used select distinct which sort of works
however, i get the first item is listed twice?

looks like this

office
officeofiice
production
stores
goods in
dispatch

any idea why it would be doing that???

Check the data in the cell, since it probably has an error, so it displays the row as if it was a different entry. If it recognized the data as distinct, it probably is.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.