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

Hide Labels if no records in detail 1

Status
Not open for further replies.

perrymans

IS-IT--Management
Nov 27, 2001
1,340
US
I have a couple grouping levels (PartNumber and SerialNumber) on a report. In the SerialNumber Group header are three labels:

Transaction, Transaction Date, Transaction Notes.

The details of these are located in the detail section of the report.

I run the report and all shows up fine, BUT, not all records have transactions associated with them. But the labels still display in the header for that group like so:

158
Transaction Transaction Date Transaction Notes
------------------------------------------------

160
Transaction Transaction Date Transaction Notes
------------------------------------------------

I would like to avoid the clutter of these labels when there are no details to report for that SerialNumber.

Thanks. Sean.
 
I'm not sure how 158 shows as a group if there aren't any transactions from 158. Are you using an outer join in your report's record source?

I think you could add a control to the group header bound to:
Name: txtCountTrans
Control Source:=Count([Transaction])
Then add code to the group header like:
Me.lblTransaction.Visible = Me.txtCountTrans>0

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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top