Solved

Binding Objects

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel object stays open 19 73
Prevent checkbox click event occur while editing it in vb6 8 41
Advice in Xamarin 21 78
Set email body to html using vbscript 6 41
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

785 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