Link to home
Start Free TrialLog in
Avatar of TimHudspith
TimHudspith

asked on

Cannot set DataGrid's datasource property to ADO Data Control

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".

ASKER CERTIFIED SOLUTION
Avatar of stevbe
stevbe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TimHudspith
TimHudspith

ASKER

Yes, from the additional controls list it's Microsoft DataGrid Control, Version 6.0 (OLEDB).
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.