hi there.. you are a little confused ;)
see this: you are passing a Sql to the combo, but you are not passing any conection string to it so how will the combo connect to something??
Anyway, the above is not the method to do that.. One simple way to do this is to pass to the combo a datatable filled, and you only have to specify which column to show and which one to use as value.
Example:
Code:
With yourcombo
.DisplayMember = "Column to show"
.ValueMember = "Column to use as value"
.DataSource = AdataTable 'Can be others sources
.SelectedIndex = -1 'to put it empty at the beginning
End With
And one question.. why are you talking about scripts, there is no scripts in here, maybe functions or procedures...
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========