Populate datagrid in custom outlook form

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
Back
Top