I am having a form with a grid having recordsourcetype as sql and recourdsource as "sele code,name,address,phone from xyz into cursor pqr"
now, I have added two combobox. Combo1 is having rowsourcetype as value and rowsource="code,name,address,phone" and combo2 is having rowsourcetype as sql and rowsource as blank
In combo2.gotfocus I have written codes as :
if .combo1.value="code"
sele code from pqr into cursor xxx order by code
endif
same for name,address,phone values.
Then I have added a command button in which I have written :
SELECT pqr
GO TOP
LOCATE FOR THIS.Parent.COMBO1.Value='"'+ALLTRIM(THIS.Parent.COMBO2.Value)+'"'
this.parent.grid1.refresh()
But the problem is that locate command searches upto last record and do not find the value i have selected (Remember I am taking data in combo2 from the same cursor having in grid)
Please help
now, I have added two combobox. Combo1 is having rowsourcetype as value and rowsource="code,name,address,phone" and combo2 is having rowsourcetype as sql and rowsource as blank
In combo2.gotfocus I have written codes as :
if .combo1.value="code"
sele code from pqr into cursor xxx order by code
endif
same for name,address,phone values.
Then I have added a command button in which I have written :
SELECT pqr
GO TOP
LOCATE FOR THIS.Parent.COMBO1.Value='"'+ALLTRIM(THIS.Parent.COMBO2.Value)+'"'
this.parent.grid1.refresh()
But the problem is that locate command searches upto last record and do not find the value i have selected (Remember I am taking data in combo2 from the same cursor having in grid)
Please help