Solved

Binding Objects

Posted on 2000-03-31
2
186 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

730 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