lcsqlnone= ' and (1 = 1) '
lcsqlstmt='select ' + alltrim(CurErptaggedlists_h.msqlselect) + ', 1.00 as ltagged '
lcsqlstmt=lcsqlstmt + ' from ' + alltrim(CurErptaggedlists_h.msqlfrom)
lcsqlstmt=lcsqlstmt + ' where ' + alltrim(CurErptaggedlists_h.msqlwhere) + lcsqlnone
lcsqlstmt = lcsqlstmt + ' order by ' + alltrim(CurErptaggedlists_h.morderby)
*activ screen
*suspen
lnresult=sqlexec(osystem.ncomhandle,lcsqlstmt,'Curtaggedlist')
*suspend
IF lnresult >= 1
LOCAL lnobjcntr, lcobjname
*-- note - going by lnobjcntr even though - could go by ncolumnno - in case ncolumnno is duped
lnobjcntr=0
assert .f.
DO while not eof('Curerptaggedlists_d')
lnobjcntr=lnobjcntr+1
lccolobjname='column' + alltrim(str(lnobjcntr))
this.grdtaggedlist.addobject(lccolobjname,"column")
lccontrolsource=alltrim(Curerptaggedlists_d.ccontrolso)
this.grdtaggedlist.&lccolobjname..controlsource=lccontrolsource
this.grdtaggedlist.&lccolobjname..currentcontrol="text1"
this.grdtaggedlist.&lccolobjname..visible=.t.
this.grdtaggedlist.&lccolobjname..width=Curerptaggedlists_d.nwidth
this.grdtaggedlist.&lccolobjname..header1.caption=alltrim(Curerptaggedlists_d.cheader)
Skip in Curerptaggedlists_d
ENDDO
lnobjcntr=lnobjcntr+1
this.grdtaggedlist.&lccolobjname..bound=.f.
*if I take out the line below- will get data type mismatch when I
** set bound to .t., or, if i don't set bound to .f. to begin with,
** will get data type mismatch when i click on the checkbox
** if I even 'think about' setting the value property of the *checkbox
*here, to zero or 1 - or setting it period to anydata - I get a C5 *error.
* somehow setting the controlsource to a global numeric first makes my *problem go away - don't ask me why i even thought of doing this - dumb luck
** just had a vague notion that vfp wasn't keeping the data type of the *control in scope
this.grdtaggedlist.&lccolobjname..controlsource=gnnumber
*this.grdtaggedlist.&lccolobjname..controlsource='curtaggedlist.ltagged'
this.grdtaggedlist.&lccolobjname..newobject('checkbox1','chkboxtag','satfilter')
*this.grdtaggedlist.&lccolobjname..bound=.f.
*this.grdtaggedlist.&lccolobjname..checkbox1.value=.f.
this.grdtaggedlist.&lccolobjname..checkbox1.caption=''
this.grdtaggedlist.&lccolobjname..currentcontrol="checkbox1"
this.grdtaggedlist.&lccolobjname..sparse=.f.
this.grdtaggedlist.&lccolobjname..visible=.t.
this.grdtaggedlist.&lccolobjname..width=Curerptaggedlists_d.nwidth
this.grdtaggedlist.&lccolobjname..header1.caption='Selected'
this.grdtaggedlist.&lccolobjname..bound=.t.
this.grdtaggedlist.recordsource='Curtaggedlist'
this.grdtaggedlist.&lccolobjname..controlsource='curtaggedlist.ltagged'