Subreport problem

  • Thread starter Thread starter Shane
  • Start date Start date
S

Shane

Hello,

I have what I think is a simple problem but it is beyond abilities to
resolve, even after a trawl of the net and searching various Newsgroups.

I have a form that prompts a User for a number, using a normal InputBox and
storing the value in a variable.

From the form, there is the ability to generate a report (with subreports)
and one of the subreports fields is a calculated field which multiplies a
figure by the variable from the InputBox.

When generating the report, I get the error message "Run time error '2191'.
You can't set the ControlSource property after printing has started". I
appreciate that this is because of the Print Preview view of the report but
surely there is a way around this?

The structure of the report is as follows.....
Main report.....
1st sub report
2nd sub report (i.e. subreport of 1st subreport)

The field in question lies on the 2nd subreport.

I am using Access 2000.

Any help would be much appreciated.



Shane Clark
 
Rather than the InputBox I'd have the user enter the number into a textbox
on the form. You can validate the entry if necessary. Leave that form
open as you launch your report. Let the element of your subreport refer
back to the control on the form: forms!MyForm!MyTextbox Note that the form
must be open. You can make it invisible if necessary.

hth
 
Back
Top