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

Hiding Empty Fields in reports

Status
Not open for further replies.

lemccoy

Technical User
Jul 29, 2005
2
BS
Hi...Fair warning: I am relatively new to the Access world and so I am not up to date on most things!

I have a question which probably has a simple answer. I have a contacts database which I need to print out regularly. In order to save space and eliminate white space I was wondering if it was possible to hide empty fields, such as address line 2. So instead of

Company 1
Address Line 1

City, State, Zip

I get:

Company 1
Address Line 1
City, State, Zip

But if Address Line 2 is there then it will print it out. Any ideas?

Thanks for your help.
 
Under properties, change the "Can shrink" property to "Yes". That should do it.
 
This doesn't shift the bottom lines up. It is in a report which is as follows:

Report Header
Page Header
Company Name Header
Company Name
Address Line 1
Address Line 2
City State Zip
Detail
Contact Persons & Info
Company Name Footer
Page Footer
Report Footer

I would like the blank "address Line 2" to just not be there and shift the other lines up? Is this possible?
 
Hmmm... I think you need to set "Company Name Header" shrink property to yes as well.
 
Did you check Northwind DB Customer Labels report? It uses Trim() function

________________________________________________________________________
Zameer Abdulla
Visit Me
No two children are alike - particularly if one is yours and the other isn't.
 
I would make the height of AddressLine2 as small as you can, and set CanGrow to YES.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Another neat way if the txtbox is based on a yes no field is
to put..

Code:
=IIf([fieldname]=True,"what you want to be shown","")

in the control source of the textbox.

Ian Mayor(UK)


Program Error
Programmers do it one finger at a time!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top