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 = "SELECT * FROM STATUS_DET WHERE STATUS_PROJECT = '"
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