Using on-the-fly in a report?

  • Thread starter evilcowstare via AccessMonster.com
  • 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
 
C

Carl Rapson

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
 
E

evilcowstare via AccessMonster.com

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

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
 

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