>But I still don't understant why
>Select... ORDER BY CLT_CODE,DATE works and
>Select... ORDER BY DATE,CLT_CODE does not work.
VFP is doing exactly what you are telling it to do. The ORDER BY CLT_CODE, DATE tells the query to order the records by code first and if there are duplicate entries of code then order those by date.
The second one is ordering by date. If there are duplicate date entries then those records are ordered by code.
Secondary orders are only used if duplicate records are found using the primary sort order. If you don't specify a secondary order then the record number or physical order in the table is used to sort the records.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao