L
Leslie Isaacs
Hello All
I have a form that opens in continuous form view, where I need a textbox
[balance] to display the running sum of [amount credit]-[amount]. As there
is no 'running sum' property for a form's textbox (as there is on a report's
texbox), I have had to create an expression for the control source of
[balance] to do the job:
=DSum("[payments]![amount
credit]-[amount]","[payments]","([payments]![stmt_date]<[stmt_datee] or
([payments]![stmt_date]=[stmt_datee] and [payments]![id1]<=[id11])) and
[payment date]>#31/3/08#")
The criteria for this DSum expression, combined with the specific ordering
of the records on the form, ensures that the displayed balance corresponds
correctly to each record - and it works perefctly - except that it can take
over 30 seconds for [balance] to be displayed for every record. When the
form opens, the [balance] field on every record is initially blank. After a
few seconds they start to fill in, but even with just ~100 records it can
take over 30 seconds for them all to be displayed.
Is there a better way of doing this?
What a pity there isn't a 'running sum' property for a form's textbox as
there is on a report's texbox!! (or is there??)
Hope someone can help.
Many thanks
Les
I have a form that opens in continuous form view, where I need a textbox
[balance] to display the running sum of [amount credit]-[amount]. As there
is no 'running sum' property for a form's textbox (as there is on a report's
texbox), I have had to create an expression for the control source of
[balance] to do the job:
=DSum("[payments]![amount
credit]-[amount]","[payments]","([payments]![stmt_date]<[stmt_datee] or
([payments]![stmt_date]=[stmt_datee] and [payments]![id1]<=[id11])) and
[payment date]>#31/3/08#")
The criteria for this DSum expression, combined with the specific ordering
of the records on the form, ensures that the displayed balance corresponds
correctly to each record - and it works perefctly - except that it can take
over 30 seconds for [balance] to be displayed for every record. When the
form opens, the [balance] field on every record is initially blank. After a
few seconds they start to fill in, but even with just ~100 records it can
take over 30 seconds for them all to be displayed.
Is there a better way of doing this?
What a pity there isn't a 'running sum' property for a form's textbox as
there is on a report's texbox!! (or is there??)
Hope someone can help.
Many thanks
Les