Hiding a Null Field and it's label in a Subreport

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,
I am trying to get a field and its' label to not be visible on the subreport
if the field is null.

Does anyone know how to do this? Its driving me crazy.
 
Open the report in design view.

Click on the control ("fields" are in tables). Open the control's
properties. Find the Can Grow and Can Shrink properties -- and set them
both to Yes.

Click on the section in which the control sits. Set the section's Can Grow
and Can Shrink properties to Yes.

NOTE: if there are any controls in the report that are aligned horizontally
with the control in question, they can "hold open" the control, even if it
has Null.

NOTE2: you don't have to do this on the associated label. You DO have a
label attached to the control, right?!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Thank you so much for your quick reply. I love this site!

Your suggestion worked for the control in the detail, but not for the its'
label in the the header.
 
Add a line of code to the section's Format event:

Me.textbox.Visible = Not IsNull(Me.textbox)
 
IT WORKS!!!! Thank you. I am doing a dance in my cubicle right now.

Marshall Barton said:
Add a line of code to the section's Format event:

Me.textbox.Visible = Not IsNull(Me.textbox)
--
Marsh
MVP [MS Access]

Thank you so much for your quick reply. I love this site!

Your suggestion worked for the control in the detail, but not for the its'
label in the the header.
 

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

Back
Top