I have a query (BALANCE_Q 2) that's based on another query (BALANCE_Q1).
BALANCE_Q 1 runs in a split second.
BALANCE_Q 2 runs in about 8 seconds and the result is shown below. Note only 59 records.
There's no doubt that it's because of my expression for Balance, RunTotal, and Counter, are what is slowing it down. If I delete those three, the query runs in a split second.
The query generates what I want, but is there another way to accomplish this, that would speed the query up?
BALANCE_Q 1 runs in a split second.
BALANCE_Q 2 runs in about 8 seconds and the result is shown below. Note only 59 records.
There's no doubt that it's because of my expression for Balance, RunTotal, and Counter, are what is slowing it down. If I delete those three, the query runs in a split second.
Code:
Balance: CCur([MajorM&IFundTotal]+[BEMARFund]-DSum("[TotalPoolRequest]","[BALANCE_Q 1]","[CustomNumberForOrdering] >= " & [CustomNumberForOrdering]))
RunTotal: CCur(DSum("[TotalPoolRequest]","[BALANCE_Q 1]","[CustomNumberForOrdering] >= " & [CustomNumberForOrdering]))
Counter: DCount("ProjectID","[BALANCE_Q 1]","[CustomNumberForOrdering] >= " & [CustomNumberForOrdering])
The query generates what I want, but is there another way to accomplish this, that would speed the query up?