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

Cannot set DataGrid's datasource property to ADO Data Control

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

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…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
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…

808 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