Link to home
Start Free TrialLog in
Avatar of victorlong
victorlong

asked on

List control bound to a field?

Hi,

After connecting a mdb by ADO

Dim oCon As New ADODB.Connection
Dim oRec As New ADODB.Recordset
oCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\try.mdb"
oRec.Open "select * from table1", oCon

How to bind a list control to a field?
Avatar of victorlong
victorlong

ASKER

Hi,

Nobody can help me ??

Or, perhaps using ADODC control would be easier?
Avatar of Éric Moreau
set list1.datasource = orec
Hi emoreau,

What is orec?
You mean using ADODC control or not? Can you show me the whole code?
oRec is your recordset!

Dim oCon As New ADODB.Connection
Dim oRec As New ADODB.Recordset
oCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\try.mdb"
oRec.Open "select * from table1", oCon
set list1.datasource = orec
Hi emoreau,

Thank  you.

But  list1 will be bound with which fiels? How a list is bound to a whole recordset ?
Hi emoreau,

And I have just tested we can not set  property, DataSource during run time.
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial