Click to See Complete Forum and Search --> : Dataenvironment & commands
opposite99
Sep 6th, 2000, 07:47 AM
Hello Guys, How to navigate the records of child command??
I only know how to navigate the tables of Parent command but not for child.
DataEnvironment1.rscommand1.movenext
What bout child command?
I tried this but cannot work
DataEnvironment1.recordsets("rscommand2").movenext??
IB9280
Sep 13th, 2000, 12:42 PM
According to a White Paper provided by Microsoft, accessing child command objects requires that you create a Recordset obejct in code:
Dim|Public recordset1 as ADODB.Recordset
You must then assign the recordset object to the Parent-Command-object field that references the Child Command
Set recordset1 = DataEnvironment1.rscommand1.Fields("childcommand1").Value
Recordset1 now contains the records that correspond to the child command.
If you declare Recordset1 in the General section of the command DataEnvironment1 module and include "WithEvents" i.e.
Public WithEvents recordset1 as ADODB.Recordset
You have access to its events and can place code in the events.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.