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
Solved

Binding Objects

Posted on 2000-03-31
2
184 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 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

861 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