IIF not working consistently

W

WestWingFan

I have a report with a subreport. On the main report is a text box with the
following IIF statement for its control source:

=IIf([sbrptCAAppStdsbyGroup].[Report].[HasData],"______",Null)

It was working perfectly until I tried to run the report on the new set of
data. Now there are times that the IIF doesn't fire correctly (in some cases
there is a _____ when there shouldn't be and there is no _____ where there
should). But some times the statement works as intended. I don't even know
where to begin troubleshooting this one.

Thanks in advance for your help!
 
W

WestWingFan

Duane!

I'm so glad you answered. No, the text box is in a separate section of the
main report. The subreport is in the detail section.

Duane Hookom said:
Is the text box in the same section of the main report as the subreport?
--
Duane Hookom
Microsoft Access MVP


WestWingFan said:
I have a report with a subreport. On the main report is a text box with the
following IIF statement for its control source:

=IIf([sbrptCAAppStdsbyGroup].[Report].[HasData],"______",Null)

It was working perfectly until I tried to run the report on the new set of
data. Now there are times that the IIF doesn't fire correctly (in some cases
there is a _____ when there shouldn't be and there is no _____ where there
should). But some times the statement works as intended. I don't even know
where to begin troubleshooting this one.

Thanks in advance for your help!
 
W

WestWingFan

So, I tried moving the textbox into the detail area of the report. It seems
to have fixed it for the moment. I wonder if the different section was
causing the programing to get out of synch...

Thanks for the suggestion!

WestWingFan said:
Duane!

I'm so glad you answered. No, the text box is in a separate section of the
main report. The subreport is in the detail section.

Duane Hookom said:
Is the text box in the same section of the main report as the subreport?
--
Duane Hookom
Microsoft Access MVP


WestWingFan said:
I have a report with a subreport. On the main report is a text box with the
following IIF statement for its control source:

=IIf([sbrptCAAppStdsbyGroup].[Report].[HasData],"______",Null)

It was working perfectly until I tried to run the report on the new set of
data. Now there are times that the IIF doesn't fire correctly (in some cases
there is a _____ when there shouldn't be and there is no _____ where there
should). But some times the statement works as intended. I don't even know
where to begin troubleshooting this one.

Thanks in advance for your help!
 
D

Duane Hookom

I expect that was the issue. You could keep it in both sections to check it
out.

--
Duane Hookom
Microsoft Access MVP


WestWingFan said:
So, I tried moving the textbox into the detail area of the report. It seems
to have fixed it for the moment. I wonder if the different section was
causing the programing to get out of synch...

Thanks for the suggestion!

WestWingFan said:
Duane!

I'm so glad you answered. No, the text box is in a separate section of the
main report. The subreport is in the detail section.

Duane Hookom said:
Is the text box in the same section of the main report as the subreport?
--
Duane Hookom
Microsoft Access MVP


:

I have a report with a subreport. On the main report is a text box with the
following IIF statement for its control source:

=IIf([sbrptCAAppStdsbyGroup].[Report].[HasData],"______",Null)

It was working perfectly until I tried to run the report on the new set of
data. Now there are times that the IIF doesn't fire correctly (in some cases
there is a _____ when there shouldn't be and there is no _____ where there
should). But some times the statement works as intended. I don't even know
where to begin troubleshooting this one.

Thanks in advance for your help!
 

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