Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 7th, 2006, 02:13 PM
Registered User
 
Join Date: Jun 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access Reports - hiding blank fields

Hi
Does anyone know if there is a way of hiding/omitting blank fields in an Access report? Any help would be appreciated.
Thanks

 
Old December 7th, 2006, 02:35 PM
ru1 ru1 is offline
Authorized User
 
Join Date: Feb 2005
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 [email protected] if you need anymore help. I do this kind of thing all the time.

Chuck(Ru1)

 
Old December 7th, 2006, 04:16 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You can also set the control's Can Shrink property to Yes

mmcdonal
 
Old December 12th, 2006, 07:58 PM
Registered User
 
Join Date: Jun 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with blank fields in Shipping Address radrussell BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 November 23rd, 2009 11:57 AM
Crystal reports (v8.5) returning blank fields rainman_matthew Crystal Reports 0 December 6th, 2005 11:55 AM
Blank fields - queries with many tables dvarrin Crystal Reports 0 February 1st, 2005 05:43 AM
Parameters fields coming up blank in report jjshah BOOK: Professional Crystal Reports for VS.NET 0 January 26th, 2005 03:19 PM
Crystal Reports, to occupy blank spaces singaravel Crystal Reports 1 September 22nd, 2004 02:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.