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

Hiding Labels in cases where the value is "null"

Status
Not open for further replies.

cbpwc01

Technical User
Feb 11, 2005
25
0
0
UM
I am running a report from a query of 50 individual datapoints, the results stacked vertically. I have set both the details section and each individual text box as "can shrink".

Since the data is stacked vertically, the can shrink fundtion will not delete the labels. Is there a method to get around this?
 
The best way I have found to do this is in the detail On Print function of the report.

If isnull([field that can be null]) then
me.label.visible = false
else
me.label.visible = true
end if


HTH
 
You can change the labels to text boxes and set their control sources to something like:
="DataPoint1 " + [DataPoint1FieldName]
Set this text box to shrink and don't allow it to grow. Make sure the box is wide enough to only show your "label text".

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