Solved

Binding Objects

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…
Suggested Courses
Course of the Month8 days, 21 hours left to enroll

615 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