Closing Spaces on Report

R

Roger Bell

I have designed a report which has the following Text Box for listing
Children's Names and Age. It works, however the lines do not close up when
the details are blank. The code is as follows:

=Trim([Name of Child 1] & (" "+[Expr1]))+Chr(13)+Chr(10) & Trim([Name of
Child 2] & (" "+[Expr2]))+Chr(13)+Chr(10) & Trim([Name of Child 3] & ("
"+[Expr3]))+Chr(13)+Chr(10) & Trim([Name of Child 4] & ("
"+[Expr4]))+Chr(13)+Chr(10) & Trim([Name of Child 5] & ("
"+[Expr5]))+Chr(13)+Chr(10) & Trim([Name of Child 6] & (" "+[Expr6]))

I have also used this code for labels, which works fine.
Can any one tell me if my code is correct or is it not possible to close up
blank spaces where are are no children or only 1 or 2?
Thanks for any help
 
T

Tom Lake

Roger Bell said:
I have designed a report which has the following Text Box for listing
Children's Names and Age. It works, however the lines do not close up when
the details are blank. The code is as follows:

=Trim([Name of Child 1] & (" "+[Expr1]))+Chr(13)+Chr(10) & Trim([Name of
Child 2] & (" "+[Expr2]))+Chr(13)+Chr(10) & Trim([Name of Child 3] & ("
"+[Expr3]))+Chr(13)+Chr(10) & Trim([Name of Child 4] & ("
"+[Expr4]))+Chr(13)+Chr(10) & Trim([Name of Child 5] & ("
"+[Expr5]))+Chr(13)+Chr(10) & Trim([Name of Child 6] & (" "+[Expr6]))

I have also used this code for labels, which works fine.
Can any one tell me if my code is correct or is it not possible to close up
blank spaces where are are no children or only 1 or 2?
Thanks for any help


Do you have all those fields in one record? (Child 1, Child 2, etc.)
If so you should seriously consider normalizing your data so that
the child data is in a separate table.

Tom Lake
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top