Hey guys,

So, I have a CheckedListBox that will be used to choose what columns they want to select from a database. Is it at all possible to display it in the format of [Table Name].[Column Name]?

So far I have this:

        theQuery.Connection = con
        theQuery.CommandText = strColumns
        theAdapter.SelectCommand = theQuery

        clbFields.DataSource = theTables
        clbFields.DisplayMember = "Table_Name"


I tried adding another clbFields.DisplayMember, but this obviously just overwrites the table name with the column name. I also tried doing:

clbFields.DisplayMember = "Table_Name" & "." & "Column_Name"

but that didn't work either. Was worth a try though lol.

I know it's not exactly life threatening if the user can only see the column name, but it'd be nice to be able to see the table name in case of any duplications :)

Thanks in advance for any help :)

You can concatenate table name and column name in TheQuery you've used to populate theTables and use that instead.

:O you're a genius! I'd completely forgotten about concatenation lol.

Thank you very much :)