I want to fill a listbox with results from a recordset.
I used to fill it with
listbox.rowsource = "SELECT veld FROM tabel".
That works fine but now I have to retrieve data from another database.
How do I tell the listbox to connect to the other database?
I allready have this;
Set ws = CreateWorkspace("ODBCwerkruimte", "", "", dbUseODBC)
Set Conn = ws.OpenConnection("SenP", dbDriverNoPrompt, False, "ODBC;DATABASE=SenP;UID=;PWD=;DSN=SQLSenP")
Set Rst = Conn.OpenRecordset(SQL, dbOpenDynamic, , 1)
The problem is now to get the results into the listbox.
I used to fill it with
listbox.rowsource = "SELECT veld FROM tabel".
That works fine but now I have to retrieve data from another database.
How do I tell the listbox to connect to the other database?
I allready have this;
Set ws = CreateWorkspace("ODBCwerkruimte", "", "", dbUseODBC)
Set Conn = ws.OpenConnection("SenP", dbDriverNoPrompt, False, "ODBC;DATABASE=SenP;UID=;PWD=;DSN=SQLSenP")
Set Rst = Conn.OpenRecordset(SQL, dbOpenDynamic, , 1)
The problem is now to get the results into the listbox.