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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying a Subreport with Null records 2

Status
Not open for further replies.

smitty691

Technical User
Jul 24, 2003
24
US
I hope that Subject Line was accurate. Here is what I'm working on:

I have a report that will show Donors, the last contact, and the next planned contact. All this info comes from seperate tables. A Donor Bio table, a contact table, a planned move table. I have queries set for the contact and planned move so that I get the last contact and the next move.

Right now there is a report that pulls the names of a set of donors. For each donor I have a subreport that shows the last contact. Right below that i have a second subreport that is showing any planned future contact. If there are no planned contacts, the subreprt doesn't show at all. I need the border box to show and something like "No planned event" to show in the space there would be a record row.

Is this possible?

 
I would create a similar sized text box with a control source like:
=IIf(sprtB.Report.HasData, Null, "No Planned Event")


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]
 
I hide a label behind the subreport and set its default to visible = no, then:
Code:
    If Me!BlockA.Report.HasData = False Then
        lblNoDataBlockA.Visible = True
    Else
        lblNoDataBlockA.Visible = False
    End If

It's always darkest before dawn. So if you're going to steal your
neighbor's newspaper, that's the time to do it.
 
Thanks so much to both of you for responding. I ended up using genomon's code but that whole 'hasdata' concept is going to be very useful in the future.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top