Recordsort ของ ซัฟฟอร์มที่ชื่อ frmDepDoccSub ใส่โค้ดไปว่า
SELECT qryDepDoc.Cabinet, qryDepDoc.Shelf, qryDepDoc.Block, qryDepDoc.Sequence, qryDepDoc.DateRecieve, qryDepDoc.AppNo, qryDepDoc.CIF, qryDepDoc.CusName, qryDepDoc.DocTypeCode, qryDepDoc.DocTypeName, qryDepDoc.DateStart, qryDepDoc.Status, qryDepDoc.[01], qryDepDoc.[02], qryDepDoc.[03], qryDepDoc.[04], qryDepDoc.[05], qryDepDoc.[06]
FROM qryDepDoc
WHERE (((qryDepDoc.Cabinet)=[forms]![frmSearchDoc]![Cb_Cabinet]) AND ((qryDepDoc.Shelf)=[forms]![frmSearchDoc]![Cb_Shelf]) AND ((qryDepDoc.Block)=[forms]![frmSearchDoc]![Cb_Block]))
ORDER BY qryDepDoc.Sequence DESC;