ADO DataControl + DataGrid Control 
Author Message
 ADO DataControl + DataGrid Control

Having a problem with trying to get a Parent/Child recordset to work,
hopefully somebody will point my glaring obvious mistake.

Using the controls above (SP3) + a list box. What needs to happen is when
the user clicks on a new row in the grid, the list box is populated with
detail records from another table. In theory - easy, in practice - ???

So, I know that the data control is working, I can query a field from the
recordset no problem. My problem comes when I try to use the MoveCompleted
event of the data control. This is where I will populate the list box with
the detail records. I keep getting an error saying the event signature is
incorrect, or the name is already in use. (in fact, I get for almost evry
event of the control)

Has anybody come across this??

This would be how the event would look

Private Sub adoSummaryRS_MoveComplete(ByVal adReason As
ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As
ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

Dim adoStatus As New ADODB.Recordset
Dim sSource As String

' Set up the SQL statement for the recordset
sSource = sSource & adoSummaryRS.Recordset.Fields("Name").Value & "'"

' Open Sesame!!!
adoStatus.Open sSource, "Provider=Microsoft.Jet.OLEDB.3.51; Data
Source=npd.mdb", adOpenDynamic, adLockOptimistic

' Clear out the list box and re-populate
Do While Not adoStatus.EOF
 lstStatus.AddItem adoStatus.Fields("STATUS_STATUS").Value


End Sub

Wed, 08 Jan 2003 03:00:00 GMT  
 ADO DataControl + DataGrid Control
Solved the problem. You'll never believe it was a bug !!!!

In case you are interested, the URL is

Regards all


Wed, 08 Jan 2003 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Connecting ADO Datacontrol and Datagrid to Foxpro Table

2. VB6 Rebind Datagrid to ADO DataControl

3. Cannot bind DataGrid using ADO DataControl to an Acess 2000 table

4. ADO Control/Datagrid Control

5. Filling a datagrid with DAO (no datacontrol object)

6. Can you use Datagrid without DataControl?

7. Datagrid / Datacontrol

8. DataGrid not responding to its datacontrol

9. DataGrid and Datacontrol

10. DataControl/DataGrid w/Checkbox

11. Control/Object Usage to update DataGrid via ADO.NET

12. ADO/DAO Q: how to release (unlock) mdb from dbgrid/datagrid control


Powered by phpBB® Forum Software