hide associated text box when field is null in report

I have a report in access 2007, which lists catagories, some of the catagories have sub-catagories,  attached to the catagories are text boxes which are there simply to have a place to fill in on paper date acheived etc.  The items which have sub-catagories alos need these boxes but only when they are present, if I add the text boxes they show even when the sub is null and it makes the formatting a mess.  I need a way to somehow hide the text boxes when the value is null
smurfer69Asked:
Who is Participating?
 
RomoloConnect With a Mentor IT Professional ConsultantCommented:
Select the field in the reprot./. Right click Properties

Goto Can Shrink property

When the field is empty it will hide the field

R
0
 
clarkscottCommented:
In design view, right-click on the left margin report section where the field resides (Header, Detail, etc.) and select the FORMAT propert.
In this code section.....

If isnull(me.YouField) then
    me.YourTextBox.visible = false
else
   me.YourTextBox.visbible = true
end if

Scott C
0
 
smurfer69Author Commented:
The code does not seem to run, I had initial forgotten the end if and no error
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
smurfer69Author Commented:
I have a question what stops the detail section from showing when ther is not data in the sub?
0
 
clarkscottCommented:
Did you right-click on the Report Section - on the gray box in the left side margin- Detail, Header, Footer, etc?
Did you select Properties from the exposed menu?

Did you select ON FORMAT event and enter the code?

You can alway type STOP in the code (before any other code).  The app will break at that point and display the code (stop on the word "STOP")

If the app doesn't stop - then you've coded something that isn't part of 'the process'.

Scott C

0
 
RomoloIT Professional ConsultantCommented:
Many thanks

Happy to help

R
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.