|
Subject:
|
Access Reports - hiding blank fields
|
|
Posted By:
|
Gandalf_the_Grey
|
Post Date:
|
12/7/2006 1:13:07 PM
|
Hi Does anyone know if there is a way of hiding/omitting blank fields in an Access report? Any help would be appreciated. Thanks
|
|
Reply By:
|
ru1
|
Reply Date:
|
12/7/2006 1:35:51 PM
|
Hi. Well, in the "on print" event procedure, check to see the the field is visible and ten set the visible attribute to false. see code Below:
me.address2.visible = false If not isnull(me.address2) then me.address2.visible = True. End IF
This little bit of code in the "ON Print" event procedure makes address2 invisible no matter what and then turns it on if the field is present.
email me at chanderson@uaw.net if you need anymore help. I do this kind of thing all the time.
Chuck(Ru1)
|
|
Reply By:
|
mmcdonal
|
Reply Date:
|
12/7/2006 3:16:47 PM
|
You can also set the control's Can Shrink property to Yes
mmcdonal
|
|
Reply By:
|
KarenLong
|
Reply Date:
|
12/12/2006 6:58:23 PM
|
You can only set the field to shrink if it is on its own line and there is not a label included within the report. Make sure that you check to see if the value is not null AND is not equal to "", or zero string. The syntax for checking both to see if either condition is true is:
If ctl = "" Or IsNull(ctl) Then
www.markxx.com
Karen S. Long MarkXX Consulting, LLC 103 Clearview Drive McMurray, PA 15317 (724)942-4831
|