jaykishan_82
01-10-2009, 12:59 AM
Dear Friends,
Need your help on below case.
I am trying to polulate data in Subform (like: dbgrid in VB) using ADODB recordset. But i show's only single record in Subform.
Please find the code and help of this matter?
Private Sub Cmd_Load_Click()
Dim Cn as ADODB.connection
Dim RstLoad as adodb.recordset
cn.open "Connection string of the database from which i want to populate in subform".
rstload.open ("Select * from "Table_Name"),cn
set me."subformname".form.recordset=rstload
do while not rstload.eof
me."subformname".controls("text1 name of subform")=rstload.fields("Name").value
rstload.movenext
loop
rstload.close
end sub
This code words fine but only bind single record from recordset and reflect in subform.
Kindly help ?
Regards,
JK
Need your help on below case.
I am trying to polulate data in Subform (like: dbgrid in VB) using ADODB recordset. But i show's only single record in Subform.
Please find the code and help of this matter?
Private Sub Cmd_Load_Click()
Dim Cn as ADODB.connection
Dim RstLoad as adodb.recordset
cn.open "Connection string of the database from which i want to populate in subform".
rstload.open ("Select * from "Table_Name"),cn
set me."subformname".form.recordset=rstload
do while not rstload.eof
me."subformname".controls("text1 name of subform")=rstload.fields("Name").value
rstload.movenext
loop
rstload.close
end sub
This code words fine but only bind single record from recordset and reflect in subform.
Kindly help ?
Regards,
JK