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

hiding fields on access reports 3

Status
Not open for further replies.

clientuser

Programmer
Apr 18, 2001
296
US
Is there a way to make a field not visible on an access report if there is no data in that field? I have tried several things but nothing has worked...
 
on the onformat event of the section place:

if isnull(me!ctrlname) or me!ctrlname="" then
me!ctrlname.visible=false
else
me!ctrlname.visible=true
end if
Stevie B. Gibson
 
That worked great.. Now can I take it even 1 step further... the fields that are not visible now on the report leave a gap.. is there a way to decrease this gap when these fields arent visible?
 
Uhm...I tried something like that...reduce the field to the minimum height..just to see the borders and set the CanGrow property to true.
It should work...I've a report that use this method Stevie B. Gibson
 
ummmm.....
don't you mean to set the Can Shrink property to yes?
 
If I remember right using the shrink it don't shrink :p
I used the CanGrow property with a small Field Stevie B. Gibson
 
Can grow will not make the field shrink; Can Shrink works fine if the field is empty.

Just put a few stacked text boxes on a report. Make the value of one in the middle empty and preview the report. If the can shrink property is 'No' you will see a gap between the displayed values.

Now set the can shrink property to 'Yes' and look at the report again. The other text boxes will collapse so no gap will be visible.

 
Just a note to Stevie B. Gibson, I have been searching for the answer to this same question for several weeks, your suggestion worked for my problem. Even though I wasn't really in this conversation, I just wanted to say THANKS, Michael
 
I answered a similar question in another thread (link below) which could be adapted to this problem. If you need further help please let me know!

thread703-80976 Joe Miller
joe.miller@flotech.net
 
Thank you Steve, that "Can Grow" on a hairline-thin field was what I needed to know as well!

regards,

WSA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top