Hello, all.
I have a combo box that sorts a form based on an accession number. The accession number is alpha-numeric (like this: 4KF093). My question is this: How can I have the combo sort the accession numbers by (1) the first digit, descending, then (2) the last three digits, ascending. I have used Mid and Left functions to return the digits separately, but I can't make the query sort both independently. It will only sort one or the other. How do I sort the query twice in sequence?
The query stands as follows:
SELECT tblProposalNos.PropID, tblProposalNos.PropNum, tblProposalNos.PropName, Left([PropNum],1) AS Expr2, Mid([PropNum],4,6) AS Expr1
FROM tblProposalNos
ORDER BY Left([PropNum],1) DESC , Mid([PropNum],4,6);
Any help greatly appreciated as always.
Mallen
I have a combo box that sorts a form based on an accession number. The accession number is alpha-numeric (like this: 4KF093). My question is this: How can I have the combo sort the accession numbers by (1) the first digit, descending, then (2) the last three digits, ascending. I have used Mid and Left functions to return the digits separately, but I can't make the query sort both independently. It will only sort one or the other. How do I sort the query twice in sequence?
The query stands as follows:
SELECT tblProposalNos.PropID, tblProposalNos.PropNum, tblProposalNos.PropName, Left([PropNum],1) AS Expr2, Mid([PropNum],4,6) AS Expr1
FROM tblProposalNos
ORDER BY Left([PropNum],1) DESC , Mid([PropNum],4,6);
Any help greatly appreciated as always.
Mallen