John, I have a question for you. Think of what I'm doing is like ranking
scores (actually dollar values). The counting and sorting I'm doing works,
but occasionally I have a tie, same score, and it effects my results.
SELECT DISTINCT [ABC Cycle Preview].extcost AS ExtStdCost, Sum([ABC Cycle
Preview].extcost) AS SumOfExtCost, Format(DSum("ExtCost","ABC Cycle
Preview","[ExtCost]>=" & [ExtStdCOst] & ""),"0,000.00") AS RS, [ABC Cycle
Preview].descript, [ABC Cycle Preview].onhand, [ABC Cycle Preview].stdcost
This gives me a runningsum in a query. When [ExtCost] hits a duplicate, RS
does not change. Got an idea? TIA!
-JS
John Vinson said:
I was too quick on the answer. This returns the record number from the
table, not sequential in my query. D'oh!
Ok, if the query is named QueryName:
DCount("field1","QueryName","field1 <='" & [field1] & "'")
Don't expect this to run really fast...
John W. Vinson[MVP]