Using on-the-fly in a report?

  • Thread starter Thread starter evilcowstare via AccessMonster.com
  • Start date Start date
E

evilcowstare via AccessMonster.com

Hi I have 2 txt boxes in my form that do calcualtions using the control
source.
For example the txt box margin has a control source of netcost-jobcost (which
are also txt boxes).
As the two txt boxes results are not stored in a table can someone please
tell me how I can get the results to show in any report that has "margin" as
a field. What control do I use for it to pick up the results from the
calculation that was made in the form. Not every report has both netcost and
jobcost in.

Should I put them both in there and make them invisible and then do the
calculation again in the control source of margin??

Thank You
 
evilcowstare via AccessMonster.com said:
Hi I have 2 txt boxes in my form that do calcualtions using the control
source.
For example the txt box margin has a control source of netcost-jobcost
(which
are also txt boxes).
As the two txt boxes results are not stored in a table can someone please
tell me how I can get the results to show in any report that has "margin"
as
a field. What control do I use for it to pick up the results from the
calculation that was made in the form. Not every report has both netcost
and
jobcost in.

Should I put them both in there and make them invisible and then do the
calculation again in the control source of margin??

Thank You

You could pass the value of 'margin' to the report in the OpenArgs parameter
of the OpenReport call, and pick it up in the report's Open event. You can
test for OpenArgs being Null, which would mean no margin value was passed
in. The 'margin' field in the report would be unbound.

Carl Rapson
 
HI Carl thanks for your help, Ive managed to fix all the reports
Thank You :o)

Carl said:
Hi I have 2 txt boxes in my form that do calcualtions using the control
source.
[quoted text clipped - 13 lines]
Thank You

You could pass the value of 'margin' to the report in the OpenArgs parameter
of the OpenReport call, and pick it up in the report's Open event. You can
test for OpenArgs being Null, which would mean no margin value was passed
in. The 'margin' field in the report would be unbound.

Carl Rapson
 
Back
Top