Make Fields Invisible in Detail, or Field Header? (1 Viewer)

Heatshiver

Registered User.
Local time
Today, 18:28
Joined
Dec 23, 2011
Messages
263
Is there a simple way, or special event, that can be used to turn off the visibility of fields when they are in the detail or in a created header for a field?

I tried using the report's Load event, but this kept giving me errors. Are any of the events in the detail able to allow this?

Thanks.
 

CazB

Registered User.
Local time
Today, 12:28
Joined
Jul 17, 2013
Messages
309
strange question maybe, but why do you need to do this? If you are not going to show them, can you not just either delete them, or set them with 0 height and width so they're too small to be seen? Or just set their Visible property to No?
 

Heatshiver

Registered User.
Local time
Today, 18:28
Joined
Dec 23, 2011
Messages
263
Not a strange question at all. Certain fields may not always contain a value and I would prefer them to be gone if that is the case.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:28
Joined
Feb 19, 2002
Messages
43,430
If you want to hide the labels for empty controls, you would put the code in the Format event of the section that contains the control. This will not reorganize the remaining columns. Shrink and Grow only work vertically. If an entire row is empty, Access will not print it.
 

Heatshiver

Registered User.
Local time
Today, 18:28
Joined
Dec 23, 2011
Messages
263
This raises a good point I was wondering. If the fields were organizes vertically, and a few in the middle were invisible, then the gap would disappear?
 

Heatshiver

Registered User.
Local time
Today, 18:28
Joined
Dec 23, 2011
Messages
263
Just clarifying as I tried the On Format event for my field header and making them invisible didn't work. No errors, but not working. All fields are in a vertical format.

Tried seeing if maybe this was only meant for Print View, but it gives me errors when switching to that view and all the fields still show...
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:28
Joined
Feb 19, 2002
Messages
43,430
If you want us to debug code, you're going to have to post it.
 

Users who are viewing this thread

Top Bottom