Add one new record to query

If you wanted the flagged record to always be first, make the flag a BYTE integer, not a Yes/No field, and make the flag 0 for your header and 1 for "natural" data. Call it "NaturalFlag" or sometime simpler to type. Then for the recordset that contains the header, use ORDER BY NaturalFlag, SortKey. Since 0 comes before 1, this "special" record will come first. But it is the ONLY record with that value, so everything that follows will be "natural" records in the order of your sort key.
 

Users who are viewing this thread

Back
Top Bottom