Solved

Cannot set DataGrid's datasource property to ADO Data Control

Posted on 2007-04-03
3
457 Views
Last Modified: 2013-12-25
I'm using Microsoft's DataGrid and ADO Data Control for the first time in an Excel VBA application.

I want to populate the DataGrid from an Access table via the ADO data control. I've followed the design-time instructions on MSDN :
1. set the adodc.ConnectionString and adodc.RecordSource properties
2. set dataGrid.DataSource property to the adodc control

The problem is step 2: the datagrid's properties window does not list a datasource, even though it is listed in the control's object library. I've tried to set the property at runtime but to no avail - this gives me the message "Method or data member not found".

0
Comment
Question by:TimHudspith
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
stevbe earned 500 total points
ID: 18843057
are you sure you have the correct data grid control on your form?
0
 

Author Comment

by:TimHudspith
ID: 18843224
Yes, from the additional controls list it's Microsoft DataGrid Control, Version 6.0 (OLEDB).
0
 

Author Comment

by:TimHudspith
ID: 18843325
Stevbe: False alarm - I didn't realise that the datasource property is itself an object, so I was missing the 'Set' statement at runtime.

Still don't understand why I can't see it in the properties window though.

Anyway, it's working now. Have the points.
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

Suggested Solutions

Title # Comments Views Activity
Access Runtime 2010 Error 17 32
Two list boxes - best structure 3 32
Track name AutoCorrect info 14 47
Parse last 2 characters of text value if they are letters 7 17
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.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

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

12 Experts available now in Live!

Get 1:1 Help Now