Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display text when no data in subreport 1

Status
Not open for further replies.

jw5107

Technical User
Jan 20, 2004
294
US
I have a text box on the main report next to a subreport that has this function:
=IIf(qry75730Dayrpt.Report.HasData=False,"No action items for 30 days out","")

How can I get the text box to NOT be visible when the subreport HAS data??

Any suggestions???

Thanks in advance!!
jw5107
 
jw5107
place this code in the relevant section format event.

if not qry75730Dayrpt.Report.HasData then
txtWhatever.Properties("Visible")=False
end if

Regards
Steve
 
Sorry jw5107

The code shold read:-

if qry75730Dayrpt.Report.HasData then
txtWhatever.Properties("Visible")=False
end if

I put a non relevant NOT in there!!!

Steve
 
jw5107,
What are you seeing in the text box when there is data? I would expect that nothing should appear when there is data in the subreport.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
dhookum,

I get #Name? in the text.

Any fixes?

Thanks,

jw5107
 
Is "qry75730Dayrpt" the name of your subreport control? What is the name of the text box containing the expression? It should not be the name of a field.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
dhookum,

I got it. The subreport name was not specified. When changes the text box is not visible when there is data in the Subreport.

Thanks!!!

Awesome!!!

jw5107
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top