I am trying to sort a calculated field in a query (ascending order). The field involved is calculated from three field that all give back a sorting order on fields from the table (with thanks to you already).
My SQL statement is as follows
SELECT tblCl.ClNaam, tblVerm.Verm, tblVerm.Rev, tblVerm.Fet, Val(DCount("*","tblVerm","[Verm]>" & [Verm])+1) AS Rank1, Val(DCount("*","tblVerm","[Rev]>" & [Rev])+1) AS Rank2, Val(DCount("*","tblVerm","[Fet]>" & [Fet])+1) AS Rank3, [Rank1]+[Rank2]+[Rank3] AS TotalRank
FROM tblCl INNER JOIN tblVerm ON tblCl.ClNR = tblVerm.ClNR
ORDER BY [TotalRank];
Runnig this query gives a table that seems to be in random order. Apart from that it always shows a "Enter Parameter Value" dialog box for the TotalRank field.
Could somebody tell me what I do wrong?
My SQL statement is as follows
SELECT tblCl.ClNaam, tblVerm.Verm, tblVerm.Rev, tblVerm.Fet, Val(DCount("*","tblVerm","[Verm]>" & [Verm])+1) AS Rank1, Val(DCount("*","tblVerm","[Rev]>" & [Rev])+1) AS Rank2, Val(DCount("*","tblVerm","[Fet]>" & [Fet])+1) AS Rank3, [Rank1]+[Rank2]+[Rank3] AS TotalRank
FROM tblCl INNER JOIN tblVerm ON tblCl.ClNR = tblVerm.ClNR
ORDER BY [TotalRank];
Runnig this query gives a table that seems to be in random order. Apart from that it always shows a "Enter Parameter Value" dialog box for the TotalRank field.
Could somebody tell me what I do wrong?