Cursor: crsDisclaimers DisclaimerID DisclaimerText Cursor: crsFunds FundTypeID FundName FundID DisclaimerID SELECT crsFunds (ORDERed by FundTypeID) SCAN * Make the results do this: Top Disclaimer (SQL from crsDisclaimers for the FundType) DISPLAY individual fund records for the FundTypeID Bottom Disclaimer (SQL from crsDisclaimers for the FundType) * Footnotes (SQL from crsDisclaimers for the FundType) ENDSCAN* These two sections need to only display after the individual records. The problem is by the time I know that the FundTypeID has changed, I'm already on the next record and my SQL (or IF logic) is not referencing the next FundType records.