Solved

Binding Objects

Posted on 2000-03-31
2
178 Views
Last Modified: 2010-05-02
How can I bind an object(datacombo) in a form to a ado control in another form using native code ? Exemplo :

I´ve been triying this :

private sub form_load
   set datacombo1.datasource = form1.adodc1
   set datacombo1.rowsource = form1.adodc1
   datacombo1.listfield = form1.adodc1.recordset!field1
   datacombo1.boundcolunm = form1.adodc1.recordset!field2
end sub

I got a error message "Invalid Property Value" in the third and fourth lines. What´s wrong ?

Thanks
0
Comment
Question by:tomcruisew
2 Comments
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 20 total points
ID: 2673405
Use this instead:

private sub form_load
   set datacombo1.datasource = form1.adodc1
   set datacombo1.rowsource = form1.adodc1
   datacombo1.listfield = "field1"
   datacombo1.boundcolunm = "field2"
end sub
0
 
LVL 9

Expert Comment

by:samopal
ID: 2673536
.. or
datacombo1.listfield = form1.adodc1.recordset.fields(1).name
   
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now