Instead of the cell value use grdSummary RecordSource.Field
e.g. crsSummary.cTrackLoc
>I tried passing ncolindex to the dodefault and nothing happened.
>
>the code for the Populate_detail method is as follows:
>
>thisform.grdDetail.RecordSource = ''
>SELECT cjobno,dcreate,dserved,ntotcalls,dtrack,ctrackto,cInstname,ccity,dlastcall,tlastcall ;
> from cSQLPT1 ;
> INTO CURSOR cur_detail ;
> WHERE ctrackloc = ALLTRIM(thisform.grdSummary.column1.cgridtextbox1.Value) ;
> ORDER BY dtrack DESC, cjobno
>SELECT cur_detail
>GO TOP
>WITH thisform.grdDetail
> .recordsource = 'cur_detail'
> .column1.controlsource = 'cur_detail.cjobno'
> .column2.controlsource = 'cur_detail.dcreate'
> .column3.controlsource = 'cur_detail.dserved'
> .column4.controlsource = 'cur_detail.ntotcalls'
> .column5.controlsource = 'cur_detail.dtrack'
> .column6.controlsource = 'cur_detail.ctrackto'
> .column7.controlsource = 'cur_detail.cinstname'
> .column8.controlsource = 'cur_detail.ccity'
> .column9.controlsource = 'cur_detail.dlastcall'
> .column10.controlsource = 'cur_detail.tlastcall'
> .sethighlightbar()
> .refresh()
>ENDWITH
If it's not broken, fix it until it is.
My Blog