Problem with calculated controls

  • Thread starter Thread starter Martin Watts
  • Start date Start date
M

Martin Watts

I have problem with a single page report of statistical data. The report
contains calculated controls only all using the dcount function and the
report is unbound. It displays fine in print preview but all fields return
'#Error' when printed.

I tried binding the report to the underlyng query, but it then wanted to
print of the same number of copies as there are records in the query.

What's going wrong?

TIA

Martin Watts
 
By clicking on a control button on a form this brings up a small pop up form
with a combo box from which you can select the relevant year as the
parameter for the query which is referenced by the calculated controls on
the report. There is a control button on the pop up for previewing the
report. I have a attached a macro to the onopen event of the report which
closes the first form. There is then a control button on the pop up form to
close that.

None of the DCount()s reference any controls on a form, they all reference a
query.

Martin Watts
 
If none of the DCount()s reference any controls on a form then how is the
relevant year combo box used? If this combo box is used by the query(s) and
the query(s) are used by DCount() then it seems that the controls on the
report would depend on the control on the form. My guess is that you have
closed the form prior to printing the report.
 
Excellent. Quite correct, the form from which the user selected the
relevant year was closing after the report was opened but before the print
command was selected. Works great now. Thanks. Case of not being able to
see the woods for the trees.

Martin Watts
 
Back
Top