The following SQL can be used as a guide for the query of your subform. You will have to update the table name, field name, and add additional fields to the select that you need for your subform.
SELECT Count(*) AS LineNo, tblYourTable.OrderNumber
FROM tblYourTable, tblYourTable AS tblYourTable_1
WHERE (((tblYourTable_1.OrderNumber)<=tblYourTable.OrderNumber))
GROUP BY tblYourTable.OrderNumber
ORDER BY Count(*);
Let me know if you need additional assistance with this.
Bob Scriver