The problem here is that 'msele' is a local variable. Try this:
local lccom
lccom="This.rowsource =[ "+msele+" ] "
&lccom
This probably will work too, but I am not quite sure:
This.rowsource = &msele
> I have a list box which has to display data. The code is as follows:
>
> Local msele
> msele =''
>
> Msele = " SELECT Poschedule.schno, Poschedule.stdate, Poschedule.endate,Poschedule.schqty, Poschedule.schqty-Poschedule.accqty"
> Msele = Msele +" FROM gears!poschedule WHERE Poschedule.pono = mrefkey1 AND Poschedule.partno = mpartno AND Poschedule.stagecode = mstagecode"
> Msele = Msele +" AND Poschedule.podate = mrefkey2 AND Poschedule.poref = mreftype AND Poschedule.grinno=0"
> Msele = Msele +" AND (month(poschedule.podate) = month(date()) OR (((Poschedule.schqty+Poschedule.rejqty-Poschedule.accqty) >0"
> Msele = Msele +" AND poschedule.stdate < date()))) INTO CURSOR poschlist"
>
> This.rowsource = msele
> This.rowsourcetype=3
>
> Thisform.refresh()
>
> Here anything declared with m as the starting is a variable declared in the form. My problem is the data is not getting displayed. Can anybody help me?
>
> Regards
> Vijayendran S