473,322 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Remove blank fields from a calculated text box

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
2 3947
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: JDS | last post by:
Hi, all. I'd like to do the following, preferably *without* resorting to JavaScript: I have a long, dynamically-generated form questionnaire. Not all of the form fields are dynamically...
3
by: Jack | last post by:
Hi, I have a asp input form of a financial report. Here most of the fields are text boxes where the user need to input the values corresponding to an item. However, there are few items which are...
1
by: Mosher | last post by:
Hi all, I am looking for some event handler auto-calc help on a form that takes user input through text fields and dropdown menus. I would like some of the text fields to be auto populated when...
2
by: B Love | last post by:
Hello Group, I have 2 text fields that I would like to concatenate for use in a table. One field is an ordinary text box. The other is a simple combo box which I use to select one of about ten...
1
by: Miguelito Bain | last post by:
hi everybody. i'm trying to find out what you can and can't do with/in calculated fields. any help, pointers, and/or advice would be greatly appreciated. i'm a newbie, but i want to learn, and...
5
by: John Bahran | last post by:
I am trying to use calculated fields in my query but all the results are zero ven when they're not. Please help. Thanks.
18
by: TORQUE | last post by:
Hi, Im wondering if anyone can help me with a problem. I have a form with more than 50 unbound fields. Some of the fields will be blank from time to time. This seems to be where im having...
1
by: tucson | last post by:
I have a gridview that has a blank row with 2 input fields: file to upload, and a description of the file. They click Add and a new row is added, Remove and the row is removed. The problem is:...
2
by: Will | last post by:
Hi, I need to handle blank values in a query calculation. I have 636 records at the moment but when I sum over these records the blank fields are not returned. I have looked around here and on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.