hi,
thank you for reply,
but i works as my code,he get the first record from my grid ,when i exit form the first report privew, return back the same record ,i click again to exit from report preview,mygrid not visible ,and set focus to text1 at my form.
select 2
lsno=upper(ALLtrim(THISFORM.TEXT1.VALUE))
SELECT * from trans1;
where ALLTRIM(no)=lsno AND cod=1;
into CURSOR mycursor
IF RECCOUNT("mycursor")>0
report form rept2 preview
ENDIF
SELECT 2
USE IN mycursor
thisform.grid2.setfocus()
thanks.
regard