Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cannot set DataGrid's datasource property to ADO Data Control

Posted on 2007-04-03
3
Medium Priority
?
472 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
[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
3 Comments
 
LVL 39

Accepted Solution

by:
stevbe earned 1000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

670 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