Follow these steps.i suppose my flex grid name is grdprivate sub GrdHead()With Grd.rows=1.cols=2.row=0.col=0 .colwidth(0)=1000.text="ID".col=1 .colwidth(1)=1500.text="Name"End withEnd subprivate sub GrdData()dim r as integerr=1do while not recordset.eofr=r+1With Grd.rows=r.row=r-1.col=0 .text=recordset!1stFieldName.col=1 .text=Recordset!2ndFieldNameEnd withRecordset.MovenextloopEnd subnow call these two sub routines asCall GrdHeadCall GrdData' i think this will work for you.
Follow these steps.
ReplyDeletei suppose my flex grid name is grd
private sub GrdHead()
With Grd
.rows=1
.cols=2
.row=0
.col=0
.colwidth(0)=1000
.text="ID"
.col=1
.colwidth(1)=1500
.text="Name"
End with
End sub
private sub GrdData()
dim r as integer
r=1
do while not recordset.eof
r=r+1
With Grd
.rows=r
.row=r-1
.col=0
.text=recordset!1stFieldName
.col=1
.text=Recordset!2ndFieldName
End with
Recordset.Movenext
loop
End sub
now call these two sub routines as
Call GrdHead
Call GrdData
' i think this will work for you.