IIf [HasData]

J

JohnLute

I'm having trouble with the following text box control source:

=IIf([rptPKWeightCalculator].[Report].[HasData],[rptPKWeightCalculator].[Report]![AdditionalSUPWt],0)+[SumTotalWtg]

The text box is in a subreport. When I run the main report the parameter
dialog pops up prompting for a "rptPKWeightCalculator".

I've checked my spelling over again and it's all correct.

Does anyone see what's wrong?

Thanks!!!
 
J

JohnLute

Bob Quintal said:
Is rptPKWeightCalculator the name of the form that you are using as
the Source object in the subreport you talk about?

Hi, Bob. No - frmPKWeightCalculator is the form name.
Subforms and subreports lose their names when opened in a parent
report. See http://www.mvps.org/access/forms/frm0031.htm for how to
refer to a control on a subform, the same info appliez to
subreports.

Thanks for that link, Bob. I actually arrived at a differernt solution but
this is good to know. I need to review more closely. Now I know why I was
getting those wonderful #Name and #Error displays!
 

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