[AccessD] hide blank fields in Reports

Dan Waters dwaters at usinternet.com
Thu Mar 22 18:29:47 CDT 2007


What I've done is to make the label a text box.

Then in the label textbox Source field in enter:

	=IIf(Result1 IS NULL,"","Field A")

Then I set the detail section, the label textbox, and the field label to
CanShrink = Yes.

If nothing is in Result1, then the controls and the detail section will
shrink down.

HTH!
Dan Waters

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
Beach Access Software
Sent: Thursday, March 22, 2007 6:12 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] hide blank fields in Reports

Kostas:

I have solved something like this problem before by making the height of the
text box zero that is bound to the field in question, and setting the 'Can
Grow' property to true.  However, if you've got a label you've got to set
it's height to zero, but then in the On Format event of the section it
appears in, you have to set the height of the label depending on if there is
data in the bound text box.  Mostly my labels are in the heading section so
I don't have to mess with them.

HTH

Rocky





 	
	

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kostas
Konstantinidis
Sent: Thursday, March 22, 2007 1:02 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] hide blank fields in Reports

hi group,
I want to hide the blank fields and the placeholders too in a report.
e.g.
Record 1
Field A:
Field B: result1
Field C: result2
Field D:
Should look like this:
Record 1
Field B: result1
Field C: result2

trying the
If Len(Nz(Me.Myfieldname)) > 0 Then
   Me.mylabelname.Visible = True
Else
   Me.mylabelname.Visible = False
End If

it leaves the placeholder space of the hidden fields many thank's /kostas


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.16/729 - Release Date: 3/21/2007
7:52 AM
 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





















































































































































































More information about the AccessD mailing list