By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,045 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Remove blank fields from a calculated text box

P: n/a
Hi,

I have managed to work out how to add new lines into a calculated text
box. However in this text box some of the outcome fields are empty
however when previewing the report it includes the blank fields, so
each section of the report is the same size, my field is set to can
grow/shrink, but I think my inclusion in the code for the calculated
box of all 15 outcomes (I have no choice) is what's causing each
calculated box to be the same size on the report. Is there a way of
making it only select fields where there is text? So some questions
will have three outcomes, and be three lines deep, whereas others with
more outcomes will be larger boxes in preview, at the moment each box
is 15 lines deep regardless of how many of the outcomes actually
contain any text or not.

Thanks for any help that comes my way, I'm not the most well versed
access user.

Oliver

Aug 3 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Oliver,

The properties 'Can Grow'/'Can Shrink', might help you out somewhat.

Good luck,

Nick

Olveres wrote:
Hi,

I have managed to work out how to add new lines into a calculated text
box. However in this text box some of the outcome fields are empty
however when previewing the report it includes the blank fields, so
each section of the report is the same size, my field is set to can
grow/shrink, but I think my inclusion in the code for the calculated
box of all 15 outcomes (I have no choice) is what's causing each
calculated box to be the same size on the report. Is there a way of
making it only select fields where there is text? So some questions
will have three outcomes, and be three lines deep, whereas others with
more outcomes will be larger boxes in preview, at the moment each box
is 15 lines deep regardless of how many of the outcomes actually
contain any text or not.

Thanks for any help that comes my way, I'm not the most well versed
access user.

Oliver
Aug 3 '06 #2

P: n/a
Per
I think I know what you mean. You're concatenating all the outcome
fields into a text box, separated by new lines, correct? And you don't
want to have empty lines where the output field was empty?

Then you could do it this way?

=[Outcome 1] & iif(isnull([Outcome 2]),"",chr(13) & chr(10) & [Outcome
2]) & iif(isnull([Outcome 3]),"",chr(13) & chr(10) & [Outcome 3] ) &
etc.

This way, it only adds new lines in front of non-empty lines (ie where
the output field is not blank). If you aren't sure if the empty output
fields have NULL values or ie empty strings, you can replace the isnull
with ie iif([Outcome 2]=""...

Hope this helps.

/Per
Nick 'The Database Guy' wrote:
Hi Oliver,

The properties 'Can Grow'/'Can Shrink', might help you out somewhat.

Good luck,

Nick

Olveres wrote:
Hi,

I have managed to work out how to add new lines into a calculated text
box. However in this text box some of the outcome fields are empty
however when previewing the report it includes the blank fields, so
each section of the report is the same size, my field is set to can
grow/shrink, but I think my inclusion in the code for the calculated
box of all 15 outcomes (I have no choice) is what's causing each
calculated box to be the same size on the report. Is there a way of
making it only select fields where there is text? So some questions
will have three outcomes, and be three lines deep, whereas others with
more outcomes will be larger boxes in preview, at the moment each box
is 15 lines deep regardless of how many of the outcomes actually
contain any text or not.

Thanks for any help that comes my way, I'm not the most well versed
access user.

Oliver
Aug 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.