Storing Dynamic SQL Results in a Text Box

T

TC

Hello there,

My task is to calculate the savings of a proposal using a simple formula:

Saving = Old Cost - New Cost

The Old Costs are pulled from a Table with 6 categories (rows) into the
subform 1. The total is aggregated in a Text Box in the footer of subform 1
(TB_Old_Agg)

The New Cost are dynamically calculated using a (very tedious) SQL
statement. The RecordSource of subform 2 is set equal to the SQL statement
and display in a similar fashion as on subform 1 (TB_New_Agg).

The results display ok in the Text Box on subform 2, but when I try to
subtract the new costs from the old costs, (subform1.TB_Old_Agg.value -
subform2.TB_New.value), it fells apart. There seems to be nothing stored in
subform2.TB_New.value although it is displayed correctly on the screen. Can
anyone help me on that?

I would also like to ask whether it is possible to work out the savings from
each category (i.e. individual record entries instead of the aggregate) using
a simliar method?

Thanks in adVance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top