visual basic functions
Posted on 2004-10-12
hi there, I've created a function that should return results on a datalist object:(here are the codes):
Public Function myactive_users(current_list As datalist)
Adodc1.ConnectionString = "DSN=mydsn"
Adodc1.RecordSource = "select distinct myUsers from myTable order by Myuser"
current_list.DataField = "myUsers"
current_list.ListField = "myUsers"
Set current_list.DataSource = Adodc1
Set current_list.RowSource = Adodc1
Now, when I call this function to populate results on another datalist, the compiler tells me "error mismach". This is what I am doing: myactive_users(this_datalist1)
Anybody can help on how to do that properly?
I will apreciate ur help.