>Hi John,
>
>It looks ok from here. I'm not sure what could be causing it.
>
>You may want to start a new thread in "Troublshooting" and see if some else has any ideas.
>
>>Hi Roi,
>>> I hate to keep beating a dead bird, but got a quick question. <
>>> I've got the folling code in my command button <
Where in the command button? The Click event?
>>> cGroupCode = THISFORM.text1.VALUE <
>>> SELECT * FROM client ; <
>>> WHERE group_code = cGroupCode ; <
>>> INTO CURSOR Mycursor <
>>> REPORT FORM POLICY.FRX FOR GROUP_CODE = cGroupCode PREVIEW <
This is asking for trouble - using a REPORT FORM based on a FOR in conjunction with a PREVIEW may result in the filter not being applied if the user decides to print. Either do a SELECT to a cursor, or use a P-view as the basis of the report (if you inherit from the current DE and you need the detail to have the name of the base table, you can always open the P-view with an ALIAS) so that you don't run into this particular trap
>>> IF _TALLY !=0
>>> wait window 'FOUND MATCH, WILL PRINT REPORT ' <
>>> ELSE <
>>> wait window 'NO DATA MATCH, TRY AGAIN ' <
>>>ENDIF <
>>
>>>RETURN <
Burp - the cursor MyCursor's FOR clause just became invalid, since cGroupCode just went out of scope. Try converting the SELECT to convert cGroupCode to a literal with macro-expansion and quote encapsulation as shown below:
SELECT * FROM client ;
WHERE group_code = [&cGroupCode] ;
INTO CURSOR Mycursor