Populate datagrid in custom outlook form

G

Guest

I am trying to place a datagrid on my custom Outlook forms. I have placed a datagrid control on the form (Microsoft Datagrid Control 6.0). I am now trying to populate the datagrid in the code editor, but am having issues. I have a valid recordset with data but I get an error on my DataGrid.DataSource = myRecordSet call. Below is my code:

Dim oRS
Set oRS = CreateObject("ADODB.Recordset")
oRS.Open "Select * from mytable", oConn, 1, 3
myDataGrid.DataSource = oRS

The error I am getting is:
Object doesn't support this property or method 'myDataGrid.DataSource'

What am I doing wrong? How can I populate my datagrid?

Any help would be VERY appreciated. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top