Solved

Cannot set DataGrid's datasource property to ADO Data Control

Posted on 2007-04-03
3
456 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

744 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

13 Experts available now in Live!

Get 1:1 Help Now