>I had not experienced this one before. I recently wrote code into my Class Library Reporting form to issue the _FPRESET and clear the TAG and TAG2 fields. What I did was the following:
>
>*******Code Snippet*******
>
>SELECT * FROM (some report.frx file) INTO TABLE (lcTemp)
>SELECT (lcTemp)
>BLANK FIELDS TAG,TAG2
>lnWorkArea = SELECT()
>lcReportFileName = DBF()
>USE IN (lnWorkArea)
>REPORT FORM &lcReportFileName TO PRINTER PROMPT
>
>****** End of Snippet ******
>
>Now what happened was that the report file itself had the following code in it. Remember we are now printing the Report from the Temporary Table that we created. But something very odd is about to happen.
>
>You might call this the FRX-Files! :-)
>
>IF !USED("SomeTable")
> USE "SomeTable" IN 0 AGAIN
>ENDIF
>SELECT SomeTable
>SELECT RefNum,Field1,Field2 FROM SomeTable WHERE SomeCritera INTO ;
> CURSOR cSomeCursor
>
>Here I would get an error and it would say REFNUM Not Found!
>
>Very Odd! So I Stepped through the code and I added a browse in there and when it would say SELECT SomeTable and then BROWSE it brought up the REPORT.FRX table up instead of the correct alias.
>
>I have since fixed the problem by issuing a USE IN (lnWorkarea) for both the SELECT (SomeReportFile) and the Temporary Table created from the SELECT.
>
>I just thought this was very odd! It was as if the Work Areas were getting confused.
Rich,
It's not odd if report.frx has same alias as the table itself (if !used(..)...).
Cetin