A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hide text box if null value



 
 
Thread Tools Display Modes
  #1  
Old February 2nd, 2005, 12:41 PM
Clare
external usenet poster
 
Posts: n/a
Default Hide text box if null value

I am creating a mailing report and would like to ignore address fields if
they are blank. I have tried the 'can shrink' which does work if the text
boxes aren't touching each other, but the gap above and below the shrunken
text box are still there so the address still has a space in the middle. If
the text boxes are touching each other then the can shrink doesn't seem to
work.

I have tried concatenating the string and using & Chr(13) & Chr(10) &
between the fields, but that obviously still leaves a line space.

In the control source expression builder I've started with this but don't
know what to put next.

IIf ( IsNull ( [Address] ) , «truepart», «falsepart»)

Any help would be greatly appreciated
  #2  
Old February 2nd, 2005, 02:01 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

Clare

I've not noticed the problem you mention touching controls. Have you
also set the "Can Shrink" for the section, as a whole?

--
Good luck

Jeff Boyce
Access MVP

"Clare" wrote in message
...
I am creating a mailing report and would like to ignore address fields if
they are blank. I have tried the 'can shrink' which does work if the text
boxes aren't touching each other, but the gap above and below the shrunken
text box are still there so the address still has a space in the middle.

If
the text boxes are touching each other then the can shrink doesn't seem to
work.

I have tried concatenating the string and using & Chr(13) & Chr(10) &
between the fields, but that obviously still leaves a line space.

In the control source expression builder I've started with this but don't
know what to put next.

IIf ( IsNull ( [Address] ) , «truepart», «falsepart»)

Any help would be greatly appreciated


  #3  
Old February 2nd, 2005, 04:55 PM
Clare
external usenet poster
 
Posts: n/a
Default

Well I don't know how but it's all working now, I set detail to can shrink as
well and had one address with all the boxes touching and one where they
weren't. I kept putting something into the field and then taking it away to
see how things looked. Somehow now when all the textboxes are touching it
does seem to shrink and not leave that large gap.

I think it all has to do with how you place them next to each other. I have
identical text boxes with all the same properties (only the distance from the
top is different) and one lot works another doesnt. Perhaps it's one of those
things that you should just accept and not question
  #4  
Old February 2nd, 2005, 06:47 PM
Marshall Barton
external usenet poster
 
Posts: n/a
Default

Clare wrote:

Well I don't know how but it's all working now, I set detail to can shrink as
well and had one address with all the boxes touching and one where they
weren't. I kept putting something into the field and then taking it away to
see how things looked. Somehow now when all the textboxes are touching it
does seem to shrink and not leave that large gap.

I think it all has to do with how you place them next to each other. I have
identical text boxes with all the same properties (only the distance from the
top is different) and one lot works another doesnt. Perhaps it's one of those
things that you should just accept and not question



Two things to keep in mind here. One is that it is ok if
two controls exactly touch top to bottom, but it is not ok
if they overlap by even the smallest amount. This can be
very difficult to achieve without help. What I do is set
the report's GridX and GridY properties to 20 and set each
text box's Height to a multiple of .05. This way the Snap
to Grid option can position them exactly as needed.

The other thing is with side by side controls. While either
control will shrink as appropriate, it is near meaningless
because the section can not shrink unless both controls
shrink.

The situation when you use a single text box will supress
the new lines if you judiciously mix + and & concatenations.
For example:
=FullName & (Chr(13) + Chr(10) + Address1) & (Chr(13) +
Chr(10) + Address2) & . . .

--
Marsh
MVP [MS Access]
  #5  
Old February 3rd, 2005, 10:31 AM
Clare
external usenet poster
 
Posts: n/a
Default

Marshall,

I had thought it could have been something to do with getting lucky with
positioning them close but not overlapping. That + and & has solved
everything though, it looks so much neater. No more trying to light
everything up perfectly now.

Thanks,

Clare
  #6  
Old February 18th, 2005, 05:33 PM
Justin
external usenet poster
 
Posts: n/a
Default

For future reference, if you have an issue with controls overlapping, first
slightly overlap all text boxes in question and then highlight them all.
Next select format -- Horizontal or Vertical -- Make Equal. This will
force all text boxes to be placed flushly against one another. This removes
the trial and error guessing of placing them next to each other manually.

Justin

"Clare" wrote:

Marshall,

I had thought it could have been something to do with getting lucky with
positioning them close but not overlapping. That + and & has solved
everything though, it looks so much neater. No more trying to light
everything up perfectly now.

Thanks,

Clare

  #7  
Old January 6th, 2010, 09:11 PM posted to microsoft.public.access.reports
Brandon W
external usenet poster
 
Posts: 1
Default Hide text box if null value

Thanks Justin! I've been trying to find an easier way to do this for quite a
while.

For those using Access 2007, the commands are in the Arrange tab under
Position. There are buttons for "Equal Horizontal" and "Equal Vertical" as
well as increase and decrease buttons.

"Justin" wrote:

For future reference, if you have an issue with controls overlapping, first
slightly overlap all text boxes in question and then highlight them all.
Next select format -- Horizontal or Vertical -- Make Equal. This will
force all text boxes to be placed flushly against one another. This removes
the trial and error guessing of placing them next to each other manually.

Justin

"Clare" wrote:

Marshall,

I had thought it could have been something to do with getting lucky with
positioning them close but not overlapping. That + and & has solved
everything though, it looks so much neater. No more trying to light
everything up perfectly now.

Thanks,

Clare

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Here's a shocker Mike Labosh General Discussion 2 October 26th, 2004 05:04 PM
Access inconsistencies Hoopie Running & Setting Up Queries 2 June 15th, 2004 10:53 AM
Too many hyperlinks? [email protected] Powerpoint 7 May 25th, 2004 02:19 AM
Vertical Text Orientation Paul Anderson [MSFT] Visio 0 May 11th, 2004 05:16 PM
Text boxes-help Jon Peltier Charts and Charting 0 January 26th, 2004 06:46 PM


All times are GMT +1. The time now is 01:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.